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();
|
||||
entityInstance = persistenceContext.getEntity( euk );
|
||||
if ( entityInstance == null ) {
|
||||
if ( ((AbstractEntityInitializer) this.parentAccess).getEntityDescriptor()
|
||||
if ( ( (AbstractEntityInitializer) this.parentAccess.findFirstEntityDescriptorAccess() ).getEntityDescriptor()
|
||||
.getBytecodeEnhancementMetadata()
|
||||
.isEnhancedForLazyLoading() ) {
|
||||
.isEnhancedForLazyLoading() ) {
|
||||
return;
|
||||
}
|
||||
entityInstance = ( (UniqueKeyLoadable) concreteDescriptor ).loadByUniqueKey(
|
||||
|
|
Loading…
Reference in New Issue