Module eclipselink
Annotation Interface OptimisticLocking
The OptimisticLocking annotation is used to specify the type of optimistic locking
EclipseLink should use when updating or deleting entities.
An optimistic-locking specification is supported on an Entity or MappedSuperclass annotation.
- See Also:
- Author:
- Guy Pelletier
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanSpecify where the optimistic locking policy should cascade lock.jakarta.persistence.Column[]For an optimistic locking policy of type OptimisticLockingType.SELECTED_COLUMNS, this annotation member becomes a (Required) field.The type of optimistic locking policy to use.
-
Element Details
-
type
The type of optimistic locking policy to use.- Default:
VERSION_COLUMN
-
selectedColumns
jakarta.persistence.Column[] selectedColumnsFor an optimistic locking policy of type OptimisticLockingType.SELECTED_COLUMNS, this annotation member becomes a (Required) field.- Default:
{}
-
cascade
boolean cascadeSpecify where the optimistic locking policy should cascade lock.Currently only supported with OptimisticLockingType.VERSION_COLUMN locking.
- Default:
false
-