parent
c06f19db8d
commit
7c1ebd99bc
@ -375,11 +375,7 @@ final class PersistentCollection extends AbstractLazyCollection implements Selec
|
|||||||
|
|
||||||
$persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
|
$persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
|
||||||
|
|
||||||
if ($persister->removeElement($this, $element)) {
|
return $persister->removeElement($this, $element);
|
||||||
return $element;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$removed = parent::removeElement($element);
|
$removed = parent::removeElement($element);
|
||||||
|
@ -636,7 +636,7 @@ class ExtraLazyCollectionTest extends OrmFunctionalTestCase
|
|||||||
$group = $this->_em->find('Doctrine\Tests\Models\CMS\CmsGroup', $this->groupId);
|
$group = $this->_em->find('Doctrine\Tests\Models\CMS\CmsGroup', $this->groupId);
|
||||||
$queryCount = $this->getCurrentQueryCount();
|
$queryCount = $this->getCurrentQueryCount();
|
||||||
|
|
||||||
$user->groups->removeElement($group);
|
$this->assertTrue($user->groups->removeElement($group));
|
||||||
|
|
||||||
$this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Removing a persisted entity should cause one query to be executed.");
|
$this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Removing a persisted entity should cause one query to be executed.");
|
||||||
$this->assertFalse($user->groups->isInitialized(), "Post-Condition: Collection is not initialized.");
|
$this->assertFalse($user->groups->isInitialized(), "Post-Condition: Collection is not initialized.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user