Using Version Locking Policies

For each of the following version locking policies, you must add a specific database field.

TopLink records the version as it reads an object from a table. When the client attempts to write the object, TopLink compares the version of the object with the version in the table record.

The two version locking policies have different ways of writing to the database:

For both policies, the values of the write lock field can be the writable mapping within the object.

If the value is stored in the identity map, then by default an attribute mapping is not required for the version field. If the application does map the field, it must make the mappings read-only to allow TopLink to control writing the fields.


Related Topics

About TopLink Descriptors

Using Field Locking Policies
Specifying Advanced Optimistic Locking Policies

Working with Optimistic Locking
Working with Descriptors

 

Copyright © 1997, 2004, Oracle. All rights reserved.