Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 563

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Attribute
Applies to
singularname
one-to-many
many-to-many
one-to-many
structkeycolumn
many-to-many
type=struct
one-to-many
structkeytype
many-to-many
type =struct
type
one-to-many
many-to-many
update
many-to-one
unique
many-to-one
many-to-one
uniquekey
where
one-to-many
many-to-many
Cascade options
In an association, it is cumbersome to apply an action performed on object to the other object. For example, in case of
an Department-Employee one-to-many association, if you add an employee, the same change needs to be updated on
the Department as well. The cascade option in Hibernate allows you to perform such operations.
You can specify the following values in the cascade attribute:
: Allows you to apply all operations to be cascaded to the associated object.
all
: If the parent object is saved, the associated objects are saved as well.
save-update
: Deletes the child object if the delete operation is called on the parent object.
delete
: This is a special kind of cascade option that applies to one-to-many relation only. Deletes all child
delete-orphan
objects for which the association has been removed.
: Cascades all operations to child objects, and performs delete-orphan action.
all-delete-orphan
: Cascades the refresh action to the child object. The refresh action is used to reload an object and its
refresh
collections.
Typically,
attribute is not used on a many-to-one or a many-to-many relationship.
cascade
Re/Opt
Default
Description
optional
property
Use this property to define the custom name for generated
name
relationship methods. See
relationships between
The column in the target table to use as key if the collection
type is struct.
Optional
Specifies the data type of the key, when type=struct.
For the entire list of data types, see the Data Types section.
Optional
Specifies the datatype of the relationship property:
array
struct
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.
optional
false
Use this to add the unique constraint for the foreign key
column when the table is created by ORM. This effectively
makes this relation one-to-one.
optional
Groups columns in a single unique key constraint.
optional
Use this to specify a SQL that will be used to filter the collection
retrieved. See "Applying filters on relationship" for details.
Last updated 1/20/2012
Generated methods for
CFCs.
558

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents