Package org.eclipse.persistence.config
Class CommitOrderType
- java.lang.Object
-
- org.eclipse.persistence.config.CommitOrderType
-
public class CommitOrderType extends Object
Commit order type persistence property values.JPA persistence property Usage:
properties.add(PersistenceUnitProperties.PERSISTENCE_CONTEXT_COMMIT_ORDER, CommitOrderType.Changes);
Property values are case-insensitive. Defines the ordering of updates and deletes of a set of the same entity type during a commit or flush operation. The commit order of entities is defined by their foreign key constraints, and then sorted alphabetically.\
By default the commit of a set of the same entity type is not ordered.
Entity type commit order can be modified using a DescriptorCustomizer and the ClassDescriptor.addConstraintDependency() API. Commit order can also be controlled using the EntityManager.flush() API.
-
-
Constructor Summary
Constructors Constructor Description CommitOrderType()
-
-
-
Field Detail
-
Id
public static final String Id
Updates and deletes are ordered by the object's id. This can help avoid deadlocks on highly concurrent systems.- See Also:
- Constant Field Values
-
Changes
public static final String Changes
Updates are ordered by the object's changes, then by id. This can improve batch writing efficiency.- See Also:
- Constant Field Values
-
None
public static final String None
No ordering is done.- See Also:
- Constant Field Values
-
DEFAULT
public static final String DEFAULT
- See Also:
- Constant Field Values
-
-