No need to lookup metadata
This commit is contained in:
parent
3b92cfac5a
commit
2879162015
@ -521,10 +521,8 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
&& $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY
|
&& $this->association['fetch'] === Mapping\ClassMetadataInfo::FETCH_EXTRA_LAZY
|
||||||
&& isset($this->association['indexBy'])
|
&& isset($this->association['indexBy'])
|
||||||
) {
|
) {
|
||||||
$class = $this->em->getClassMetadata($this->association['targetEntity']);
|
if (!$this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) {
|
||||||
|
return $this->em->find($this->typeClass->name, $key);
|
||||||
if (!$class->isIdentifierComposite && $class->isIdentifier($this->association['indexBy'])) {
|
|
||||||
return $this->em->find($class->name, $key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->em->getUnitOfWork()->getCollectionPersister($this->association)->get($this, $key);
|
return $this->em->getUnitOfWork()->getCollectionPersister($this->association)->get($this, $key);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user