diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/Any.java b/hibernate-core/src/main/java/org/hibernate/annotations/Any.java index 73156bc675..ae94d7aff9 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/Any.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/Any.java @@ -17,17 +17,18 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** - * Maps a discriminated to-one style associations pointing to one of several entity types + * Maps a discriminated to-one style association pointing to one of several entity types * depending on a local discriminator, as opposed to discriminated inheritance where the * discriminator is kept as part of the entity hierarchy (see {@link jakarta.persistence.Inheritance} * and {@link jakarta.persistence.InheritanceType#SINGLE_TABLE} for details about discriminated * inheritance mappings). - *

+ *

* For example, if you consider an {@code Order} entity containing {@code Payment} information * where {@code Payment} might be of type {@code CashPayment} or {@code CreditCardPayment}, * the {@code @Any} approach would be to keep that discriminator and matching value on the - * {@code Order} itself. Thought of another way, the "foreign key" is really made up of the - * value and discriminator. + * {@code Order} itself instead as part of the {@code Payment} class. Thought of another way, + * the "foreign key" is really made up of the value and discriminator. Note however that this + * composite foreign-key is a conceptual and cannot be phsical. *

- * + *

* This code is generally as one of the values defined in {@link java.sql.Types}, but are not * limited to these. The code is resolved against an internal registry of {@link JdbcType} * references. See the user-guide for additional details. - * + *

* See for high-level discussion * of basic value mapping. * diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java index c77bb616a9..e013f2b219 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/JdbcTypeRegistration.java @@ -19,10 +19,10 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Describes a SqlTypeDescriptor to be added to the {@link JdbcTypeRegistry} - * + *

* Registrations applied to a package are processed before Hibernate begins to process * any attributes, etc. - * + *

* Registrations applied to a class are only applied once Hibernate begins to process * that class; it will also affect all future processing. However, it will not change * previous resolutions to use this newly registered one. Because of this randomness 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 c0fa626036..35f31e343a 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -761,6 +761,8 @@ public interface AvailableSettings { *

  • the (case insensitive) name of a {@code CollectionClassification}, or *
  • a {@link Class} representing either {@link java.util.List} or {@link java.util.Collection}. * + *

    + * Backwards compatibility can be achieved by specifying `hibernate.mapping.default_list_semantics=bag` e.g. * * @see org.hibernate.jpa.spi.JpaCompliance#isJpaListComplianceEnabled() *