Understanding Properties

Bound Property

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

Derived Property

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

Unbound Property

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 Property

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 order 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 may 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 services. 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 order-lines collection. Then you would define the relationship between the two by defining a subcollection property on the orders IDO.