|
EclipseLink 1.2.0, build 'v20091016-r5565' API Reference | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface EmbeddedId
Is applied to a persistent field or property of an entity
class or mapped superclass to denote a composite primary
key that is an embeddable class. The embeddable class
must be annotated as Embeddable.
Relationship mappings defined within an embedded id class are not supported.
The AttributeOverride annotation may be used to override
the column mappings declared within the embeddable class.
There must be only one EmbeddedId annotation and
no Id annotation when the EmbeddedId annotation is used.
The MappedById annotation may be used in conjunction
with the EmbeddedId annotation to specify a derived
primary key.
Example:
@EmbeddedId
protected EmployeePK empPK;
Embeddable,
MappedById
|
EclipseLink 1.2.0, build 'v20091016-r5565' API Reference | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||