HHH-15481 NaturalId and Lazy cause a class cast Exception
This commit is contained in:
parent
84c4a57099
commit
6904a19835
|
@ -133,7 +133,7 @@ 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;
|
||||||
|
|
Loading…
Reference in New Issue