HHH-12687 : Update migration guide

This commit is contained in:
Gail Badner 2018-07-04 15:42:42 -07:00
parent ddc24e8659
commit 4afa2a21ae
1 changed files with 22 additions and 0 deletions

View File

@ -41,3 +41,25 @@ This strategy may require `hibernate.default_schema` and/or `hibernate.default_c
To use the old strategy, which executes a `java.sql.DatabaseMetaData#getTables(String, String, String, String[])` call for
each javax.persistence.Entity, use the property setting `hibernate.hbm2ddl.jdbc_metadata_extraction_strategy=individually`.
=== Many-to-one association in embeddable collection elements and composite IDs
A bug introduced in 4.3 caused many-to-one associations in embeddable collection elements and
composite IDs to be eagerly fetched, even when explicitly mapped as lazy.
This bug does not affect many-to-one associations that are not in a composite ID or embeddable
collection element.
In 5.1.15, this bug was fixed. As a result, such associations will be fetched as specified
by their mappings.
Many-to-one associations mapped by using native HBM xml are lazy by default. In order to keep
the associations eager in 5.1.15 and later, mappings will need to explicitly specify that
they are non-lazy.
When mapped with annotations, many-to-one associations use `FetchType.EAGER` by default.
Starting in 5.1.15, if an association is mapped with `FetchType.LAZY`, the assocation will
be lazily fetched, as expected.
See details on the https://hibernate.atlassian.net/browse/HHH-12687[HHH-12687] Jira issue.