diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/Where.java b/hibernate-core/src/main/java/org/hibernate/annotations/Where.java index 30aff90e09..73243cbe7d 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/Where.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/Where.java @@ -48,10 +48,11 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * List<Document> documents; * *
- * By default, {@code @Where} restrictions declared for an entity are + * By default, {@code @Where} restrictions declared for an entity are also * applied when loading associations of that entity type. This behavior can - * be disabled using the setting {@value org.hibernate.cfg.AvailableSettings#USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS}; - * note, however, that setting is disabled. + * be disabled using the setting + * {@value org.hibernate.cfg.AvailableSettings#USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS}. + * However, this setting is now deprecated. *
* Note that {@code @Where} restrictions are always applied and cannot be * disabled. Nor may they be parameterized. They're therefore much diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java index 6e364c9ca0..63b528acc5 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -2029,18 +2029,20 @@ public interface AvailableSettings { String CUSTOM_ENTITY_DIRTINESS_STRATEGY = "hibernate.entity_dirtiness_strategy"; /** - * The {@link org.hibernate.annotations.Where} annotation specifies a restriction - * on the table rows which are visible as entity class instances or collection - * elements. - *
- * This setting controls whether the restriction applied to an entity should - * be applied to association fetches (one-to-one, many-to-one, one-to-many and many-to-many) - * targeting the entity. + * The {@link org.hibernate.annotations.Where @Where} annotation specifies a + * restriction on the table rows which are visible as entity class instances or + * collection elements. + *+ * This setting controls whether the restriction applied to an entity should be + * applied to association fetches (for one-to-one, many-to-one, one-to-many, and + * many-to-many associations) which target the entity. * - * @apiNote The setting is very misnamed - it applies across all entity associations, not just collections. + * @apiNote The setting is very misnamed - it applies across all entity associations, + * not only to collections. * - * @implSpec Enabled ({@code true}) by default, meaning the restriction is applied. When this setting - * is disabled ({@code false}), the restriction is not applied. + * @implSpec Enabled ({@code true}) by default, meaning the restriction is applied. + * When this setting is explicitly disabled ({@code false}), the restriction + * is not applied. * * @deprecated Originally added as a backwards compatibility flag */