ORM:first_example - getrailo/railo GitHub Wiki
Let's have a look at a simple example where we want to persist a certain CFC to a MySQL database. Further below all necessary steps in order to get ORM to work with Railo are described. We will assume the following scenario: We have an easy blog where an author can submit his blog post containing the following properties for an entry:
- author
- publish date
- title
- teaser
- text
- tags
<cfcomponent persistent="true">
<cfproperty name="entryID" generator="increment">
<cfproperty name="author">
<cfproperty name="publishDate">
<cfproperty name="title">
<cfproperty name="teaser">
<cfproperty name="text">
<cfproperty name="tags">
</cfcomponent>
So let's create the table with the following statement: