JPA Annotation Attribute
in javax.persistence.ForeignKey

ConstraintMode value default CONSTRAINT


(Optional) Used to specify whether a foreign key constraint should be generated when schema generation is in effect.

A value of CONSTRAINT will cause the persistence provider to generate a foreign key constraint. If the foreignKeyDefinition element is not specified, the provider will generate a constraint whose update and delete actions it determines most appropriate for the join column(s) to which the foreign key annotation is applied.

A value of NO_CONSTRAINT will result in no constraint being generated.

A value of PROVIDER_DEFAULT will result in the provider's default behavior (which may or may not result in the generation of a constraint for the given join column(s).

Since:
JPA 2.1