Check owning entitiy on extra lazy get with OneToMany relation
This commit is contained in:
parent
4d93a4950b
commit
5635fa60a4
@ -47,7 +47,7 @@ class OneToManyPersister extends AbstractCollectionPersister
|
||||
throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
|
||||
}
|
||||
|
||||
return $persister->load(array($mapping['indexBy'] => $index), null, null, array(), 0, 1);
|
||||
return $persister->load(array($mapping['mappedBy'] => $coll->getOwner(), $mapping['indexBy'] => $index), null, null, array(), 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user