JPA Annotation

Inheritance

Target: TYPE
Implemented Interfaces:
Annotation

Specifies the inheritance strategy to be used for an entity class hierarchy. It is specified on the entity class that is the root of the entity class hierarchy. If the Inheritance annotation is not specified or if no inheritance type is specified for an entity class hierarchy, the SINGLE_TABLE mapping strategy is used.
Example:
   @Entity
   @Inheritance(strategy=JOINED)
   public class Customer { ... }

   @Entity
   public class ValuedCustomer extends Customer { ... }
Since:
JPA 1.0

Public Annotation Attributes

InheritanceType strategy default SINGLE_TABLE
The strategy to be used for the entity inheritance hierarchy.
Since:
JPA 1.0