1
0
mirror of synced 2025-01-31 04:21:44 +03:00

No need to lookup metadata

This commit is contained in:
Sander Marechal 2013-06-20 14:00:58 +02:00
parent 3b92cfac5a
commit 2879162015

View File

@ -521,10 +521,8 @@ final class PersistentCollection implements Collection, Selectable
&& $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY
&& isset($this->association['indexBy'])
) {
$class = $this->em->getClassMetadata($this->association['targetEntity']);
if (!$class->isIdentifierComposite && $class->isIdentifier($this->association['indexBy'])) {
return $this->em->find($class->name, $key);
if (!$this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) {
return $this->em->find($this->typeClass->name, $key);
}
return $this->em->getUnitOfWork()->getCollectionPersister($this->association)->get($this, $key);