Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 556

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Attribute
Req/Opt
optional
dbdefault
index
optional
optional
length
notnull
optional
optional
precision
scale
optional
optional
sqltype
unique
optional
optional
uniquekey
Computed property
Computed property is a property whose value does not come from a column but is computed using a SQL query. Use
formula attribute to specify the SQL to be used to retrieve the value for this property.
<cfcomponent persistent="true" table="ARTISTS" schema="APP">
<cfproperty name="ID" column="ARTISTID" fieldtype="id"/>
<cfproperty name="FIRSTNAME"/>
<cfproperty name="LASTNAME"/>
<cfproperty name="NumberOfArts" formula="select count(*) from Art art where
</cfcomponent>
Versioning
Versioning is a technique that allows you to implement concurrency control fora component. You can specify either
or
property for a component.
version
timestamp
For details, see
Optimistic
locking.
Note: A component can have only one versioning property, either timestamp or version. If you specify multiple versioning
properties, such as two timestamps, or two versions, or a timestamp and a version, an error is thrown.
Version
Use the version attribute to indicate that the column contains versioned data. The version attribute is useful for long
transactions.
Default
false
art.ArtistID=ArtistID"/>
Last updated 1/20/2012
Description
Specifies the default value of the column in the table.
Specifies the name of an index that is created using the mapped
column.
Specifies the length value.
A Boolean value that specifies whether a notnull constraint should
be added for this column.
Specifies the precision value.
Specifies the scale value.
This allows user to override the default mapping of
datatype.
is used as the DB specific SQL type for a column
sqltype
when creating the table. If this attribute is not specified, ColdFusion
will automatically decide the
sqltype
specified for this property.
For example:
<cfProperty name="active" ormtype="char"
sqltype="bit">
<cfProperty name="balance" ormtype="float"
sqltype="decimal(13,3)">
Specifies if there should be a unique constraint on the column.
Groups columns in a single unique key constraint.
551
to SQL
ormtype
based on the
ormtype

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents