1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Check owning entitiy on extra lazy get with OneToMany relation

This commit is contained in:
Sander Marechal 2013-06-27 14:17:41 +02:00
parent 4d93a4950b
commit 5635fa60a4

View File

@ -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);
}
/**