HHH-13552 Avoid retrieving the same Persister twice
This commit is contained in:
parent
80f8f0845c
commit
1d4d018dfa
|
@ -462,8 +462,9 @@ public abstract class CollectionType extends AbstractType implements Association
|
||||||
ownerId = key;
|
ownerId = key;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Type keyType = getPersister( session ).getKeyType();
|
final CollectionPersister persister = getPersister( session );
|
||||||
EntityPersister ownerPersister = getPersister( session ).getOwnerEntityPersister();
|
Type keyType = persister.getKeyType();
|
||||||
|
EntityPersister ownerPersister = persister.getOwnerEntityPersister();
|
||||||
// TODO: Fix this so it will work for non-POJO entity mode
|
// TODO: Fix this so it will work for non-POJO entity mode
|
||||||
Class ownerMappedClass = ownerPersister.getMappedClass();
|
Class ownerMappedClass = ownerPersister.getMappedClass();
|
||||||
if ( ownerMappedClass.isAssignableFrom( keyType.getReturnedClass() ) &&
|
if ( ownerMappedClass.isAssignableFrom( keyType.getReturnedClass() ) &&
|
||||||
|
|
Loading…
Reference in New Issue