Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 552

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Syntax
<cfproperty
name="property_name"
fieldType="id"
ormtype="type"
column="column_name"
generator="increment|identity
|sequence|sequence-identity|seqhilo
|uuid|guid|native|[assigned]|select|foreign"
params="{key1=val1,key2=val2...}"
sqltype="sql_type"
length="column_length"
unsavedvalue="instantiated_instance">
Example
An example to define an assigned primary key:
<cfproperty name="artistid" fieldtype="id" column="ARTISTID" generator="assigned">
An example to define a auto-generated primary key using increment generator:
<cfproperty name="artid" fieldtype="id" column="ARTID" generator="increment">
An example to define a auto-generated primary key using a generator, which requires additional parameters:
<cfproperty name="id" fieldtype="id" column="ID" generator="sequence"
params="{sequence='id_sequence'}>
Attributes
Attribute
Req/Opt
column
Optional
Optional
fieldType
generator
Optional
optional
length
name
Required
Optional
ormtype
params
Default
Description
The value of the name
Used to specify the primary key column name.
attribute
Should be "id" for primary key. If
specified and the
fieldtype
assigned
Algorithm used to generate unique identifiers for
instances of the persistent CFC. See
details.
Use this attribute to specify the length of the column. This
attribute is used for table creation only.
Name of the property
String
Used to specify the data type of the primary key. If data
type is not set and the ORM setting
useDBForMapping=true
determined by inspecting the database.
The different data types that are supported by
ColdFusion are specified in the
Additional parameters required by the various
generators to generate the ID.
The value for the
Struct syntax. For example:
{key1='value1', key2='value2'}
See
Last updated 1/20/2012
fieldtype
useDBForMapping=true
is determined by inspecting the database.
Generators
, then the
ormtype
ORM data
attribute should follow the CF
params
params =
Generators
for details.
547
is not
, then the
for
is
types.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents