Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 652

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Parameters
Parameter
Description
strategy
UUID uses the Flash UUID API to generate the ID (used for primary key of type
of type
int
Applies only for INCREMENT strategy. Specifies the initial value of the primary key. The default value is 0.
initialValue
incrementBy
Applies only for INCREMENT strategy. Specifies the integer with which the value must be incremented to generate the
primary key.
If the ID value is not present in the object, the value is generated and is assigned the primary key value. If the key value
is already present on the object instance, then the key generation is ignored.
For integer primary keys, the database table is checked for the presence of existing primary keys. If the highest key
value is greater than the
initialValue
value. For example, if the
initialValue
next key is generated with the value
Example
//Integer Primary Keys
===========
package test.apollo.CFSQLiteSupport.INCREMENTPK
{
[Entity]
[RemoteClass(alias="Customer")]
public class Customer
{
public function Customer()
{
}
[Id]
[GeneratedValue(strategy="INCREMENT",initialValue=5,incrementBy=2) ]
public var cid:int;
public var name:String;
[OneToOne(mappedBy="customer")]
public var ord:Order;
}
}
).
, then the key that is generated next will be an increment of the highest key
that you specify is
(5+1, if
6
incrementBy
Last updated 1/20/2012
string
, and the database (already) has a key value
1
is set to
).
1
) or INCREMENT (for primary key
, then the
5
647

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents