Remove useless exception
This commit is contained in:
parent
bb1f71f1f9
commit
c69b7562ab
@ -869,11 +869,6 @@ final class PersistentCollection implements Collection, Selectable
|
||||
return $this->coll->matching($criteria);
|
||||
}
|
||||
|
||||
if ($this->association['type'] !== ClassMetadata::ONE_TO_MANY
|
||||
&& $this->association['type'] !== ClassMetadata::MANY_TO_MANY) {
|
||||
throw new \RuntimeException("Matching Criteria on PersistentCollection only works on OneToMany and ManyToMany associations at the moment.");
|
||||
}
|
||||
|
||||
if ($this->association['type'] === ClassMetadata::MANY_TO_MANY) {
|
||||
$persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
|
||||
return new ArrayCollection($persister->loadCriteria($this, $criteria));
|
||||
|
Loading…
x
Reference in New Issue
Block a user