Bug Report
| Q |
A |
| BC Break |
no |
| Version |
2.9.x and newer |
Summary
UnitOfWork->computeChangeSet(ClassMetadata $class, $entity) overrides the $this->originalEntityData[$oid] by $actualData constructed inside this class.
Collections that were hydrated from the DB but not overridden ($value instanceof PersistentCollection && $value->getOwner === $entity) are skipped and not present in the $actualData variable.
This causes duplicate inserts and possibly other issues in case of subsequent flushes/computeChangeSet calls.
How to reproduce
See #9301
Expected behavior
All fields of entity should be present in $actualData (and therefore in originalEntityData).
Bug Report
Summary
UnitOfWork->computeChangeSet(ClassMetadata $class, $entity)overrides the$this->originalEntityData[$oid]by$actualDataconstructed inside this class.Collections that were hydrated from the DB but not overridden (
$value instanceof PersistentCollection && $value->getOwner === $entity) are skipped and not present in the$actualDatavariable.This causes duplicate inserts and possibly other issues in case of subsequent flushes/computeChangeSet calls.
How to reproduce
See #9301
Expected behavior
All fields of entity should be present in $actualData (and therefore in originalEntityData).