MessageHelper.infoString( persister, entityId, factory )
)
);
}
ReferenceCacheEntryImpl referenceCacheEntry = (ReferenceCacheEntryImpl) entry;
entity = referenceCacheEntry.getReference();
if ( entity == null ) {
throw new IllegalStateException(
"Reference cache entry contained null : " + MessageHelper.infoString( persister, entityId, factory )
);
}
subclassPersister = referenceCacheEntry.getSubclassPersister();
}
else {
subclassPersister = factory.getEntityPersister( entry.getSubclass() );
final Object optionalObject = event.getInstanceToLoad();
entity = optionalObject == null