Skip to content

Commit

Permalink
HHH-16820 updated migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
dreab8 committed Jun 27, 2023
1 parent bdcc619 commit 192cb27
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions migration-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,16 @@ earlier versions, see any other pertinent migration guides as well.
* link:{docsBase}/6.1/migration-guide/migration-guide.html[6.1 Migration guide]
* link:{docsBase}/6.0/migration-guide/migration-guide.html[6.0 Migration guide]
[[batch-fetching-changes]]
== Batch Fetching and LockMode

When LockMode is greater than READ Hibernate does not execute the batch fetching so existing uninitialized proxies will not be initialized.
This because the lock mode is different from the one of the proxies in the batch fetch queue.

E.g.

`
MyEntity proxy = session.getReference( MyEntity.class, 1 );
MyEntity myEntity = session.find(MyEntity.class, 2, LockMode.WRITE);
`
only the entity with id equals to 2 will be loaded but the proxy will not be initialized.

0 comments on commit 192cb27

Please sign in to comment.