Managing relationships

The ActionScript persistent framework lets you define the following relationship types between two persistent objects.
  • one-to-one

  • one-to-many

  • many-to-one

  • many-to-many

To understand how the persistent framework handles relationships, let us consider an example of the Employee and Department objects in a database.

If you do not specify attribute values, the default values are taken as follows:

  • The default table name is the class name.

  • The default value for columnDefinition is the ActionScript type of the field.

  • The default value for referencedColumnName is the primary key of the target entity.

  • The default value for targetEntity is the ActionScript type of the referring field.

Note: In case you are using ORM CFCs, the remotingFetch attribute in the <cfproperty> tag is set to false by default for all relationships. You must set this attribute to true to retrieve data on the client side.