[2.0] fixes #2478 Add/persist/retrieve was doubling the resultset of collection is solved. It was a merge in PersistentCollection creation. I am not 100% sure it is the right patch, but it works and does not break any other unit tests
This commit is contained in:
parent
2ff65dd7f0
commit
788312e1fc
@ -138,8 +138,15 @@ class ObjectHydrator extends AbstractHydrator
|
||||
$class = $this->_ce[get_class($entity)];
|
||||
$relation = $class->associationMappings[$name];
|
||||
|
||||
$pColl = new PersistentCollection($this->_em, $this->_ce[$relation->targetEntityName],
|
||||
$class->reflFields[$name]->getValue($entity) ?: new ArrayCollection);
|
||||
$pColl = new PersistentCollection(
|
||||
$this->_em,
|
||||
$this->_ce[$relation->targetEntityName],
|
||||
/*
|
||||
TICKET #2478: This seems to double resultset in Collections after add/persist/retrieve execution
|
||||
$class->reflFields[$name]->getValue($entity) ?: new ArrayCollection
|
||||
*/
|
||||
new ArrayCollection()
|
||||
);
|
||||
|
||||
$pColl->setOwner($entity, $relation);
|
||||
$class->reflFields[$name]->setValue($entity, $pColl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user