Create version mappings


Use a Version Mapping to specify the database field used by a persistent entity for optimistic locking.

  1. Select the Employee entity in the Package Explorer view.

  2. In the Persistence Outline view, select the version field of the Employee entity. The Persistence Properties view (for attributes) displays the properties for the field.

  3. In the Map As field, select Version.

    Version Mapping for version

    This figure shows the Persistence Properties page for the version field.

Dali automatically selects the Version column in the EMPLOYEE database table. In the Persistence Outline, the Version field is identified as a version mapping, as shown in the following figure:

Persistence Outline for Employee Entity

This figure shows the version attribute of the Employee entity in the Persistence Outline view.

Congratulations! All of the entities have been successfully mapped. Now you can Add the business logic to complete the tutorial application.