(Optional) Used to specify whether a foreign key constraint should be generated when schema generation is in effect.
ConstraintMode.CONSTRAINTspecifies that the persistence provider must generate a foreign key constraint. If theForeignKey.foreignKeyDefinitionelement 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_CONSTRAINTspecifies that no constraint should be generated.ConstraintMode.PROVIDER_DEFAULTselects the default behavior of the provider, which may or may not result in generation of a constraint.
- Default:
- CONSTRAINT
- Since:
- Jakarta Persistence (JPA) 1.0