Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 644

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
Customer.as
package onetoone
{
[Bindable]
[RemoteClass(alias="AIRIntegration.custome r")]
[Entity]
public class
Customer
{
[Id]
public var cid:int;
public var name: String;
[OneToOne(cascadeType='ALL',fetchType="EAGER")]
[JoinColumn(name="add_id",referencedColumnName="aid")]
public var address:Address;
}
}
Address.as
package onetoone
{
[Bindable]
[RemoteClass(alias="AIRIntegration.address")]
[Entity]
public class Address
{
[Id]
public var aid:int;
public var street:String;
}
}
MainApplication.mxml
Add code like the following in the MainApplication.mxml file to perform CRUD operations on the database.
Note: For Customer.as and Address.as ActionScript classes, global variables have been declared.
Last updated 1/20/2012
639

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents