
549
DEVELOPING
COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Las
t
upda
te
d 8/5/2010
•
foreign
: This is used with a
<one-to-one>
primary key association. In this case, the primary key is the same as
the primary key of the associated object. This generator would need the property parameter, which needs to be
specified in the
params
attribute. The value of the
param
property should be the name of the relationship property.
See
One-to-one relationships
for details.
•
seqhilo
: See
www.hibernate.org/5.html
.
•
uuid
: See
www.hibernate.org/5.html
.
•
guid
: See
www.hibernate.org/5.html
.
•
select
: See
www.hibernate.org/5.html
.
•
sequence-identity
: See
www.hibernate.org/5.html
.
Column
To indicate that a
cfproperty
maps to a column in the table, specify
fieldtype="column"
. If the
fieldtype
is not
specified for
cfproperty
, it is mapped as a column property.
Syntax
<cfproperty
name="Property name"
fieldtype="column"
column="column_name"
persistent="true|false"
formula="SQL expression"
ormtype="ormtype"
update="[true]|false"
insert="[true]|false"
optimisticLock="[true]|false"
generated="true|[false]"
length="column_length"
precision="precision"
scale="scale"
index="index_name"
unique = "true|[false]"
uniquekey="uniquekey_name"
notnull="true|[false]"
dbdefault="default_col_value"
sqltype="sql_type">
Example
To specify a simple property:
<cfproperty name="FIRSTNAME"/>
To specify a property which has a different name than that of the column name:
<cfproperty name="LNAME" column="LASTNAME"/>
To specify a property which should be read-only:
<cfproperty name="password" column="THEPASSWORD" insert="false" update="false">