matching should not change critera
The matching should behave like in ArrayCollection, where it is not changed. The criteria should be cloned so that it could be used for more than one matching operation.
This commit is contained in:
parent
6164f17229
commit
b5ba84f667
@ -878,6 +878,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
$expression = $criteria->getWhereExpression();
|
$expression = $criteria->getWhereExpression();
|
||||||
$expression = $expression ? $builder->andX($expression, $ownerExpression) : $ownerExpression;
|
$expression = $expression ? $builder->andX($expression, $ownerExpression) : $ownerExpression;
|
||||||
|
|
||||||
|
$criteria = clone $critera;
|
||||||
$criteria->where($expression);
|
$criteria->where($expression);
|
||||||
|
|
||||||
$persister = $this->em->getUnitOfWork()->getEntityPersister($this->association['targetEntity']);
|
$persister = $this->em->getUnitOfWork()->getEntityPersister($this->association['targetEntity']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user