do not initialize coll on add()
This commit is contained in:
parent
6bae2eac29
commit
1c8ae50557
@ -587,8 +587,6 @@ final class PersistentCollection implements Collection, Selectable
|
||||
*/
|
||||
public function add($value)
|
||||
{
|
||||
$this->initialize();
|
||||
|
||||
$this->coll->add($value);
|
||||
|
||||
$this->changed();
|
||||
|
@ -35,15 +35,6 @@ class PersistentCollectionFunctionalTest extends OrmFunctionalTestCase
|
||||
$this->collection->setOwner(new ECommerceCart(), $classMetaData->getAssociationMapping('products'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that PersistentCollection::add() initializes the collection.
|
||||
*/
|
||||
public function testAddInitializesCollection()
|
||||
{
|
||||
$this->collection->add(new ECommerceProduct);
|
||||
$this->assertTrue($this->collection->isInitialized());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that PersistentCollection::current() initializes the collection.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user