1
0
mirror of synced 2024-12-13 14:56:01 +03:00

DDC-1545 - Fix issue with changing values from null to something new.

This issue was introduced by a side-effect in 2.1.3 with
d9f9228d95c5ab2a200b3e2d2b358c598267afb1. In this commit read-only
objects where prevented to be updated. This lead to an invalid check not
being performed in UnitOfWork#computeChangeSet which was present before
where an association that was null would be injected into the
originalEntityData using the UnitOfWork#setOriginalEntityProperty()
method in the AbstractHydrator.

This commit now explicitly sets this field to null using the same API so
that is present during UnitOfWork#computeChangeSet.
This commit is contained in:
Benjamin Eberlei 2011-12-19 17:55:19 +01:00
parent a9035e1533
commit bf32125bad

View File

@ -443,6 +443,8 @@ class ObjectHydrator extends AbstractHydrator
}
// Update result pointer
$this->_resultPointers[$dqlAlias] = $element;
} else {
$this->_uow->setOriginalEntityProperty($oid, $relationField, null);
}
// else leave $reflFieldValue null for single-valued associations
} else {