
550
DEVELOPING
COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Las
t
upda
te
d 8/5/2010
Attributes
DDL-only attributes
The following attributes are used only when DDL generation is required and not used for runtime.
Attribute
Req/Opt
Default
Description
column
optional
Name of the property
Name of the column.
dbdefault
This sets the default value of a column in the table when schema is
exported.
fieldType
optional
column
Should be “column” for column property.
formula
optional
SQL expression that defines the value of the property. If you specify
a formula, the column value is ignored.
See
Computed property
.
generated
optional
never
Specifies that this property value is actually generated by the
database {never|always|insert}
•
never
: Specifies that the value for this property is never
generated by database
•
always
: Specifies that the value for this property is always
generated by database
•
insert
: Specifies that the value for this property is generated at
the time of insert but is not regenerated at updates.
insert
optional
true
Specifies whether the column should be included in SQL UPDATE
and/or INSERT statements:
{true/false}
Set
update=false
and
insert=false
if the column needs to be
read-only.
name
Required
Name of the property. If this attribute is not specified, the name of
the property is used as the column name.
optimisticlock
optional
true
Whether updates to this property require acquisition of the
optimistic lock on the table row:
{true/false}
ormtype
optional
string
Specifies the data type.
If specified, then
•
If ORM setting
useDBForMapping
is set to
true
and the table
exists, then
ormtype
is obtained by inspecting the table
•
(Otherewise) Type, if specified, is used as
ormtype
update
optional
true
Specifies whether the column should be included in SQL update
statement:
{true/false}
Set
update=false
and
insert=false
if the column needs to be
read-only.