HHH-15699 HibernateException: Found shared references to a collection when ShareCacheMode.All or ShareCacheMode.DISABLE_SELECTIVE
This commit is contained in:
parent
d9c790cae1
commit
ff973d4580
|
@ -102,6 +102,12 @@ public class EntityDelayedFetchInitializer extends AbstractFetchParentAccess imp
|
||||||
if ( loadingEntityLocally != null ) {
|
if ( loadingEntityLocally != null ) {
|
||||||
entityInstance = loadingEntityLocally.getEntityInstance();
|
entityInstance = loadingEntityLocally.getEntityInstance();
|
||||||
}
|
}
|
||||||
|
if ( entityInstance == null ) {
|
||||||
|
entityInstance = persistenceContext.getEntity( entityKey );
|
||||||
|
if ( entityInstance != null ) {
|
||||||
|
entityInstance = persistenceContext.proxyFor( entityInstance );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( entityInstance == null ) {
|
if ( entityInstance == null ) {
|
||||||
if ( referencedModelPart.isOptional() && parentAccess != null && parentAccess.getInitializedPart()
|
if ( referencedModelPart.isOptional() && parentAccess != null && parentAccess.getInitializedPart()
|
||||||
|
|
Loading…
Reference in New Issue