Package javax.persistence
Annotation Type ForeignKey
-
@Target({}) @Retention(RUNTIME) public @interface ForeignKeyThe ForeignKey annotation is used in schema generation. It is used to define a foreign key constraint or to override or disable the persistence provider’s default foreign key definition.- Since:
- JPA 2.1
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringforeignKeyDefinition(Optional) The foreign key constraint definition.java.lang.Stringname(Optional) The name of the foreign key constraint.ConstraintModevalue(Optional) Used to specify whether a foreign key constraint should be generated when schema generation is in effect.
-
-
-
-
value
ConstraintMode value
(Optional) Used to specify whether a foreign key constraint should be generated when schema generation is in effect.- Default:
- javax.persistence.ConstraintMode.CONSTRAINT
-
-