Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions api/src/main/java/jakarta/persistence/Inheritance.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
* to retrieve all fields declared and inherited by the subclass.
* </ul>
*
* <p>This annotation must be applied to the entity class that is
* the root of the entity class hierarchy. If the {@code Inheritance}
* annotation is not specified, or if no inheritance type is specified
* for an entity class hierarchy, the {@link InheritanceType#SINGLE_TABLE
* SINGLE_TABLE} mapping strategy is used.
* <p>This annotation may only be applied to an entity class that is
* the root of an entity class hierarchy, and it is always optional.
* If no inheritance strategy is {@linkplain #strategy explicitly
* specified} for an entity class hierarchy, the class hierarchy is
* mapped by the {@link InheritanceType#SINGLE_TABLE SINGLE_TABLE}
* strategy.
*
* <p>Example:
* {@snippet :
Expand All @@ -70,7 +71,7 @@

/**
* The inheritance mapping strategy for the entity inheritance
* hierarchy.
* hierarchy which descends from the annotated entity class.
*/
InheritanceType strategy() default InheritanceType.SINGLE_TABLE;
}