1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

DDC-1173 - Fix bug when calling UnitOfWork::clearEntityChangeSet() in listener

This commit is contained in:
Benjamin Eberlei 2011-06-05 13:34:07 +02:00
parent 70d756d59c
commit ddb647f39f

View file

@ -759,7 +759,9 @@ class UnitOfWork implements PropertyChangedListener
); );
} }
$persister->update($entity); if ($this->entityChangeSets[$oid]) {
$persister->update($entity);
}
unset($this->entityUpdates[$oid]); unset($this->entityUpdates[$oid]);
if ($hasPostUpdateLifecycleCallbacks) { if ($hasPostUpdateLifecycleCallbacks) {
@ -2263,7 +2265,7 @@ class UnitOfWork implements PropertyChangedListener
*/ */
public function clearEntityChangeSet($oid) public function clearEntityChangeSet($oid)
{ {
unset($this->entityChangeSets[$oid]); $this->entityChangeSets[$oid] = array();
} }
/* PropertyChangedListener implementation */ /* PropertyChangedListener implementation */