Embeddable |
An Embedded class is a class whose instances are stored as part of an owning entity; it shares the identity of the owning entity. Each field of the embedded class is mapped to the database table associated with the owning entity.
To override the mapping information for a specific subclass, use the @AttributeOverride
annotation for that specific class.
An embeddable entity is identified by the @Embeddable
annotation.
Use this procedure to add embeddable persistence to an existing entity:
Right-click the class in the Package Explorer and select Java Persistence > Make Java Persistence Entity.
In the Persistence Properties view, use the Map As drop-list to select Embeddable.
Complete the remaining Persistence Properties View (for Entities).