About IDO properties

IDO properties can be of four different types.

Bound properties

Bound properties are persistent properties whose values are stored in an Application Database table. This is the most common type of property.

Derived properties

Derived properties are properties whose values are derived from SQL expressions. You can use derived properties to calculate values, to execute subqueries, or to call SQL functions.

Unbound properties

Unbound properties are properties whose values are not stored in a database table and consequently are not persistent. Use this type of property to pass temporary values from a form to an IDO. This data can be used by a custom insert, update, or delete method.

Subcollection properties

A subcollection property is a property that specifies a child IDO that is filtered from a parent IDO. A subcollection is the child IDO whose returned collection is associated with, and dependent on, the objects returned in the primary collection belonging to the parent IDO. Subcollections are the principal mechanisms for defining hierarchical or parent-child data relationships. Use subcollections to implement one-to-many relationships between IDOs.

The typical implementation of order lines in a business application is a good example of a subcollection. Each order returns a collection of order lines. The system would define the order lines as a subcollection of the Orders IDO.

Note that order lines are dependent on orders; that is, order lines cannot exist independently of their parent orders. However, this is not a requirement of subcollections in general. For instance, you might define a collection of customers as a subcollection of the collection of account managers. Each account manager has a set of customers that he or she deals with. Customers can exist totally independently of their account managers. It should be possible, for instance, to move a set of customers to a new account manager and delete their old account manager from the system.

Subcollections can also be used to implement recursive data structures. A good example of this is a typical implementation of a product structure or bill of materials. A product structure record typically includes a reference to a set of child entities that are themselves product structure records. In this case, you could define a Product-Structures IDO with a subcollection of product structures.

To define a subcollection, you must first define the collection class that characterizes the child IDO. Then you must establish the relationship between the new child IDO and the parent IDO by creating a subcollection property on the parent. In the case of orders and order lines, you would define an Orders collection and an OrderLines collection. Then you would define the relationship between the two by defining a subcollection property on the Orders IDO.