Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 551

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Attribute
Req/Optional
optional
default
fieldtype
optional
name
required
optional
type
persistent
optional
optional
remotingFetc
h
Primary key
Simple primary key
In a relational database, a primary key is defined as a key that uniquely identifies a row in a table. Typically, a table has
one primary key that represents a single column of information in the table.
To indicate that a
cfproperty
Default
column
true
true
maps to a primary key in the table, set the attribute
Last updated 1/20/2012
Description
This sets the default value on the property when the object is
created.
This attribute is used to specify the type of the property. Use this
attribute to specify the following:
Primary key: Specify
fieldtype = "id"
the primary key in the table. For details, see
Column: Specify the
fieldtype = "column"
property to a column in the table. For details, see Column.
Relationship: Specify the
fieldtype =
"relationship_type"
. The relationship_type can be
to-one
,
one-to-many
,
many-to-one
details, see
Define
Relationships.
Version: Specify the
fieldtype="version
the column contains versioned data. For details, see Version.
Timestamp: Specify the
fieldtype="timestamp"
the column contains data with timestamp. For details, see
stamp.
Collection: Specify the
fieldtype="collection"
the collection mapping. For details, see
Specifies the name of the property.
Specifies the ColdFusion data type for the property.
Specifies whether this property should be persisted. If
persistent="false
" all the ORM related attributes are ignored.
Set this attribute to false if you do not want this property to be
persisted by ORM. For example:
<cfcomponent persistent=true>
<cfproperty name="a">
<cfproperty name="b" persistent="true">
<cfproperty name="c" persistent="false">
</cfcomponent>
When an object of this CFC is persisted, the properties a and b
would be persisted in the database but the property c would not
be persisted.
If
is
, then the value of that attribute is not
remotingFetch
false
sent over flash remoting. The attribute is true by default for all
properties. However, for ORM CFCs where persistent = true, the
value of the
attribute is set to false, by default,
remotingFetch
for one-to-one, one-to-many, many-to-one, or many-to-many
relationships.
fieldtype="id"
546
to map a property to
Primary
key.
to map a
one-
, or
many-to-many
. For
" to indicate that
to indicate
Time
to define
Collection Mapping
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents