Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: Configuring Queries for 1.1 Finders
- Next: Relationship Prefetching

## To use version consistency

1. Create the version column in the primary table.

2. Give the version column a numeric data type.

3. Provide appropriate update triggers on the version column.

   These triggers must increment the version column on each update of the specified row.

4. Specify the version column.

   This is specified in the check-version-of-accessed-instances subelement of the consistency element in the `sun-cmp-mappings.xml` file.

5. Map the CMP bean to an existing schema.

   Automatic schema generation is not supported for beans with version column consistency checking. Instead, work with your database administrator to create the schema and add the required triggers.

- Previous: Configuring Queries for 1.1 Finders
- Next: Relationship Prefetching

- © 2010, Oracle Corporation and/or its affiliates