ConstraintMode value default CONSTRAINT
(Optional) Used to specify whether a foreign key constraint should be generated when schema generation is in effect.
- ConstraintMode.CONSTRAINT specifies that the persistence provider must generate a foreign key constraint. If the ForeignKey.foreignKeyDefinition element is not specified, the provider will generate a constraint whose update and delete actions it determines most appropriate for the join column or columns to which the foreign key annotation is applied.
- ConstraintMode.NO_CONSTRAINT specifies that no constraint should be generated.
- ConstraintMode.PROVIDER_DEFAULT selects the default behavior of the provider, which may or may not result in generation of a constraint.
- Since:
- JPA 2.1