Whatever message this page gives is out now! Go check it out!

Example

Last update:
Jun 9, 2026
Application.cfc
<cfset this.name = "AG"/> 

<cfset this.ormenabled=true/> 

<cfset this.datasource = "ORM_DDL"> 

<cfset this.ormsettings.dbCreate="dropcreate"> 

<cfset this.ormsettings.sqlscript="mysqlscript.sql">
Artists.cfc
<cfcomponent persistent="true" table="Artists"> 
 <cfproperty name="artistid" fieldtype="id" ormtype="integer" length=10> 
 <cfproperty name="firstname" ormtype="string" length="20" notnull="true"> 
 <cfproperty name="lastname" ormtype="string" length="20" notnull="true"> 
 <cfproperty name="address" ormtype="string" length="50"> 
 <cfproperty name="city" ormtype="string" length="20"> 
 <cfproperty name="state" ormtype="string" length="2"> 
 <cfproperty name="postalcode" ormtype="string" length="10"> 
 <cfproperty name="email" ormtype="string" length="50" unique="true"> 
 <cfproperty name="phone" ormtype="string" length="20"> 
 <cfproperty name="fax" ormtype="string" length="12"> 
 <cfproperty name="thepassword" ormtype="string" length="20"> 

</cfcomponent>
art.cfc
<cfcomponent persistent="true" table="Art"> 
 <cfproperty name="artid" generator="identity" fieldtype="id"> 
 <cfproperty name="artname" ormtype="string" length="50"> 
 <cfproperty name="price" ormtype="double"> 
 <cfproperty name="largeimage" ormtype="string" length="30"> 
 <cfproperty name="mediaid" ormtype="integer" length="10"> 
 <cfproperty name="issold" ormtype="boolean" dbdefault=1> 
 <cfproperty name="artist" fkcolumn="artistid" fieldtype="many-to-one" cfc="CArtists"> 

</cfcomponent>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page