JDO Annotation

ForeignKey

Target: ElementType.TYPE, ElementType.FIELD, ElementType.METHOD
Implemented Interfaces:
Annotation

Annotation for a database foreign-key. Corresponds to the xml element "foreign-key".
Since:
JDO 2.1

Public Annotation Attributes

Column[] columns default {}
Columns that compose this foreign key.
Since:
JDO 2.1
String deferred default ""
Whether this foreign key is deferred (constraint is checked only at commit).
Since:
JDO 2.1
ForeignKeyAction deleteAction default ForeignKeyAction.RESTRICT
The delete action of this foreign key.
Since:
JDO 2.1
String[] members default {}
Member (field and property) names that compose this foreign key.
Since:
JDO 2.1
String name default ""
Name of the foreign key.
Since:
JDO 2.1
String table default ""
Table for the foreign key.
This is needed iff annotating a type where the foreign key is not defined on the primary table for the type.
Since:
JDO 2.1
String unique default ""
Whether this foreign key is unique.
Since:
JDO 2.1
ForeignKeyAction updateAction default ForeignKeyAction.RESTRICT
The update action of this foreign key.
Since:
JDO 2.1