|
EclipseLink 2.5.0, build 'v20121016-ab08992' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={})
@Retention(value=RUNTIME)
public @interface ForeignKeyUsed in schema generation to override the persistence provider's default foreign key strategy. It is used to define a foreign key constraint or to otherwise override or disable the persistence provider's default foreign key definition.
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> ]
If disableForeignKey is true, the
persistence provider must not generate a foreign key constraint.
JoinColumn,
JoinColumns,
MapKeyJoinColumn,
MapKeyJoinColumns,
PrimaryKeyJoinColumn,
PrimaryKeyJoinColumns| Optional Element Summary | |
|---|---|
boolean |
disableForeignKey
(Optional) Used to specify that the persistence provider should not generate a foreign key constraint. |
java.lang.String |
foreignKeyDefinition
(Optional) The foreign key constraint definition. |
java.lang.String |
name
(Optional) The name of the foreign key constraint. |
public abstract java.lang.String name
public abstract java.lang.String foreignKeyDefinition
public abstract boolean disableForeignKey
|
EclipseLink 2.5.0, build 'v20121016-ab08992' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||