Package javax.persistence
Annotation Type ForeignKey
-
@Target({}) @Retention(RUNTIME) public @interface ForeignKey
The 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.String
foreignKeyDefinition
(Optional) The foreign key constraint definition.java.lang.String
name
(Optional) The name of the foreign key constraint.ConstraintMode
value
(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
-
-