HHH-15481 NaturalId and Lazy cause a class cast Exception
This commit is contained in:
parent
84c4a57099
commit
6904a19835
|
@ -133,9 +133,9 @@ public class EntityDelayedFetchInitializer extends AbstractFetchParentAccess imp
|
||||||
final PersistenceContext persistenceContext = session.getPersistenceContextInternal();
|
final PersistenceContext persistenceContext = session.getPersistenceContextInternal();
|
||||||
entityInstance = persistenceContext.getEntity( euk );
|
entityInstance = persistenceContext.getEntity( euk );
|
||||||
if ( entityInstance == null ) {
|
if ( entityInstance == null ) {
|
||||||
if ( ((AbstractEntityInitializer) this.parentAccess).getEntityDescriptor()
|
if ( ( (AbstractEntityInitializer) this.parentAccess.findFirstEntityDescriptorAccess() ).getEntityDescriptor()
|
||||||
.getBytecodeEnhancementMetadata()
|
.getBytecodeEnhancementMetadata()
|
||||||
.isEnhancedForLazyLoading() ) {
|
.isEnhancedForLazyLoading() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entityInstance = ( (UniqueKeyLoadable) concreteDescriptor ).loadByUniqueKey(
|
entityInstance = ( (UniqueKeyLoadable) concreteDescriptor ).loadByUniqueKey(
|
||||||
|
|
Loading…
Reference in New Issue