Adobe COLDFUSION 9 Manual page 637

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
If The source entity is inserted or updated, the target entity is also inserted or updated.
PERSIST
If The source entity is deleted, the target entity is also deleted.
REMOVE
The one-to-one, one-to-many, many-to-one, and many-to-many relationships are all supported by cascading. You can
use code like the following to specify the cascading options:
ManyToMany(cascadeType="ALL or PERSIST or REMOVE")
If you do not specify the
cascadeType
When you specify
cascadeType='ALL or REMOVE'
the parent object using
load***()
method of loading, only the parent object gets deleted from SQLite database and the child objects remain.
Note: If you have enabled lazy loading by specifying
using
method, the child objects are not loaded. When you specify
load***()
try to delete the parent object by passing it through
To overcome this limitation, use the
Using the AIR SyncManager class to manage data
The AIR application uses the SyncManager class to fetch data from the server and synchronize the local data with the
ColdFusion data source. The SyncManager uses a coldfusion.air.Session object to manage the session between the
client and the local SQLite database, and uses calls to the following methods in the ColdFusion sync manager CFC:
• fetch to get data from the remote system
• sync to synchronize the local and remote data
The following text describes basic functionality that you must implement. For details on the SyncManager and Session
classes, and other classes in the coldfusion.air package, see
standalone Adobe ColdFusion ActionScript Language Reference, which is accessible through the Documentation link
on the Resources page of the ColdFusion Administrator.
The AIR application init() function creates and configures a SyncManager instance, and fetches the initial data from
ColdFusion as shown in the following code:
option, only the source entity is persisted or updated.
to remove the parent object and the associated child objects, load
method and pass it through
session.remove(parentObj)
fetchType='LAZY'
session.remove(parentObj)
method with
load***()
ignorelazyloading='true'
ActionScript 3.0
Last updated 8/5/2010
. If you do not use this
at the entity level, when you load a parent object
cascadeType='ALL or REMOVE'
, it does not delete the child objects.
.
Reference. Alternatively, you can see the
632
and

Advertisement

Table of Contents
loading

Table of Contents