Package jakarta.persistence
Annotation Type Inheritance
- 
 @Target(TYPE) @Retention(RUNTIME) public @interface Inheritance 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 theInheritanceannotation is not specified or if no inheritance type is specified for an entity class hierarchy, theSINGLE_TABLEmapping strategy is used.Example: @Entity @Inheritance(strategy=JOINED) public class Customer { ... } @Entity public class ValuedCustomer extends Customer { ... }- Since:
- 1.0
 
- 
- 
Optional Element SummaryOptional Elements Modifier and Type Optional Element Description InheritanceTypestrategyThe strategy to be used for the entity inheritance hierarchy.
 
- 
- 
- 
Element Detail- 
strategyInheritanceType strategy The strategy to be used for the entity inheritance hierarchy.- Default:
- jakarta.persistence.InheritanceType.SINGLE_TABLE
 
 
- 
 
-