Skip to main content

XPO Classes Comparison

You can derive persistent objects from the PersistentBase, XPBaseObject, XPObject, XPLiteObject and XPCustomObject classes.

Tip

We recommend that you use the PersistentBase class as the base class for persistent classes in your applications.

XPOClassHierarchy

When objects are derived from a class, XPO features are automatically enabled for this object. For example, the OptimisticLockingAttribute is automatically applied to objects derived from the PersistentBase, XPBaseObject, XPCustomObject or XPObject class. This enables the optimistic locking feature. However, this feature is disabled when objects are derived from the XPLiteObject class.

The following table illustrates the differences between XPO classes:

Class Name Deferred Deletion Optimistic Locking Built-in OID key
PersistentBase No Yes No
XPBaseObject No Yes No
XPLiteObject No No No
XPCustomObject Yes Yes No
XPObject Yes Yes Yes

Note

We do not recommend using composite or compound keys for new databases. Composite keys may impose limitations on the default functionality. You may wish to refer to the following help topic to learn more: How to map persistent objects to database tables with composite keys.