From d5998e5eb88c0056d33001878af77b7adf8f05dd Mon Sep 17 00:00:00 2001 From: Gavin King Date: Tue, 24 Nov 2026 11:28:36 +0100 Subject: [PATCH 1/2] minor change to @Inheritance javadoc --- .../main/java/jakarta/persistence/Inheritance.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/src/main/java/jakarta/persistence/Inheritance.java b/api/src/main/java/jakarta/persistence/Inheritance.java index 31de33cb0..1c781fbff 100644 --- a/api/src/main/java/jakarta/persistence/Inheritance.java +++ b/api/src/main/java/jakarta/persistence/Inheritance.java @@ -44,11 +44,11 @@ * to retrieve all fields declared and inherited by the subclass. * * - *

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. + *

This annotation must be applied to the entity class that is the + * root of the entity class hierarchy. If no inheritance strategy is + * {@linkplain #strategy explicitly specified} for an entity class + * hierarchy, the {@link InheritanceType#SINGLE_TABLE SINGLE_TABLE} + * mapping strategy is used. * *

Example: * {@snippet : @@ -70,7 +70,7 @@ /** * The inheritance mapping strategy for the entity inheritance - * hierarchy. + * hierarchy which descends from the annotated entity class. */ InheritanceType strategy() default InheritanceType.SINGLE_TABLE; } From 9c4e58e5a18b0985481aa6dbf9abd9294203b541 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Tue, 24 Nov 2026 17:33:49 +0100 Subject: [PATCH 2/2] change to @Inheritance javadoc for @marko-bekhta --- .../main/java/jakarta/persistence/Inheritance.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/jakarta/persistence/Inheritance.java b/api/src/main/java/jakarta/persistence/Inheritance.java index 1c781fbff..a1925e10f 100644 --- a/api/src/main/java/jakarta/persistence/Inheritance.java +++ b/api/src/main/java/jakarta/persistence/Inheritance.java @@ -44,11 +44,12 @@ * to retrieve all fields declared and inherited by the subclass. * * - *

This annotation must be applied to the entity class that is the - * root of the entity class hierarchy. If no inheritance strategy is - * {@linkplain #strategy explicitly specified} for an entity class - * hierarchy, the {@link InheritanceType#SINGLE_TABLE SINGLE_TABLE} - * mapping strategy is used. + *

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. * *

Example: * {@snippet :