The ORM mapping can be defined either in the CFC or in a separate Hibernate mapping file (.hbmxml). See Advanced mapping for details on Hibernate mapping file. The ORM mapping is defined in the CFC using ORM-specific attributes on cfcomponent and cfproperty tag. 
Following example shows a CFC (ARTIST.cfc) with mapping information:

<cfcomponent persistent="true" entityname="Artist" table="Artists"> 
<cfproperty name="id" column="ARTISTID" generator="increment"> 
<cfproperty name="firstname"> 
<cfproperty name="lastname"> 
<cfproperty name="address"> 
<cfproperty name="city"> 
<cfproperty name="state"> 
<cfproperty name="postalcode"> 
<cfproperty name="email"> 
<cfproperty name="phone"> 
<cfproperty name="fax"> 
<cfproperty name="thepassword"> 

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy