Jakarta Persistence (JPA) Annotation Type

jakarta.persistence.Inheritance

Implemented Interfaces:
Annotation
Target:
Type

Specifies the inheritance mapping strategy for the entity class hierarchy which descends from the annotated entity class.

This annotation must be applied to 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 { ... }

See Also:
Since:
Jakarta Persistence (JPA) 1.0

Public Instance Methods

The inheritance mapping strategy for the entity inheritance hierarchy.
Since:
Jakarta Persistence (JPA) 1.0

Annotation Elements

This is a marker annotation with no members/elements.

Additional JDK methods inherited from java.lang.annotation.Annotation

java.lang.annotation.Annotation/annotationType(), java.lang.annotation.Annotation/equals(Object), java.lang.annotation.Annotation/hashCode(), java.lang.annotation.Annotation/toString()