Skip Headers

# Object-Level Change Tracking Policy

Previous

Next

The `ObjectChangeTrackingPolicy` optimizes the unit of work commit transaction by including objects in the change set calculation only if at least one attribute has changed.

This option provides improved unit of work commit performance for objects with few attributes, or with many attributes and many changed attributes.

When you register in a unit of work an object whose descriptor is configured with `ObjectChangeTracking` change policy, a backup clone is made of the object and at commit time, the unit of work computes changes by comparing the backup to the current object if and only if at least one attribute is changed (if the object's `hasChanges` method returns `true`). If a registered object has no changes, the unit of work does not compare it to the backup clone.

This change policy is applicable to a subset of mapping types (see "Change Policy Mapping Support").

TopLink provides different levels of support for this change policy depending on the EBJ version and application server you are using: