Skip to content

Commit

Permalink
HHH-15699 HibernateException: Found shared references to a collection…
Browse files Browse the repository at this point in the history
… when ShareCacheMode.All or ShareCacheMode.DISABLE_SELECTIVE
  • Loading branch information
dreab8 committed Nov 22, 2022
1 parent d9c790c commit ff973d4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ public void resolveInstance(RowProcessingState rowProcessingState) {
if ( loadingEntityLocally != null ) {
entityInstance = loadingEntityLocally.getEntityInstance();
}
if ( entityInstance == null ) {
entityInstance = persistenceContext.getEntity( entityKey );
if ( entityInstance != null ) {
entityInstance = persistenceContext.proxyFor( entityInstance );
}
}
}
if ( entityInstance == null ) {
if ( referencedModelPart.isOptional() && parentAccess != null && parentAccess.getInitializedPart()
Expand Down

0 comments on commit ff973d4

Please sign in to comment.