From c69b7562ab2f43d674fb73817dee27f6ec147c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Mon, 23 Dec 2013 21:13:52 +0100 Subject: [PATCH] Remove useless exception --- lib/Doctrine/ORM/PersistentCollection.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/Doctrine/ORM/PersistentCollection.php b/lib/Doctrine/ORM/PersistentCollection.php index 056f455c5..7de080484 100644 --- a/lib/Doctrine/ORM/PersistentCollection.php +++ b/lib/Doctrine/ORM/PersistentCollection.php @@ -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));