The ConstraintMode value is used to specify whether foreign
key constraints should be generated.
The syntax used in the foreignKeyDefinition element
should follow the SQL syntax used by the target database for foreign
key constraints. For example, this may be similar the following:
FOREIGN KEY ( <COLUMN expression> {, <COLUMN expression>}... )
REFERENCES <TABLE identifier> [
(<COLUMN expression> {, <COLUMN expression>}... ) ]
[ ON UPDATE <referential action> ]
[ ON DELETE <referential action> ]
When the ConstraintMode value is
CONSTRAINT, but the foreignKeyDefinition
element is not specified, the provider will generate foreign key
constraints whose update and delete actions it determines most
appropriate for the join column(s) to which the foreign key
annotation is applied.
JoinColumn, JoinColumns, MapKeyJoinColumn, MapKeyJoinColumns, PrimaryKeyJoinColumn, JoinTable, CollectionTable, SecondaryTable, AssociationOverride
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public ConstraintMode | value()
(Optional) Used to specify whether a foreign key constraint should be generated when schema generation is in effect. |
| foreignKeyDefinition | back to summary |
|---|---|
| public String foreignKeyDefinition() (Optional) The foreign key constraint definition. | |
| name | back to summary |
|---|---|
| public String name() (Optional) The name of the foreign key constraint. If this is not specified, it defaults to a provider-generated name. | |
| value | back to summary |
|---|---|
| public ConstraintMode value() (Optional) Used to specify whether a foreign key constraint should be generated when schema generation is in effect.
A value of
A value of
A value of | |