Skip to content

Commit

Permalink
DDC-1173 - Fix bug when calling UnitOfWork::clearEntityChangeSet() in…
Browse files Browse the repository at this point in the history
… listener
  • Loading branch information
beberlei committed Jun 5, 2011
1 parent 70d756d commit ddb647f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Doctrine/ORM/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,9 @@ private function executeUpdates($class)
);
}

$persister->update($entity);
if ($this->entityChangeSets[$oid]) {
$persister->update($entity);
}
unset($this->entityUpdates[$oid]);

if ($hasPostUpdateLifecycleCallbacks) {
Expand Down Expand Up @@ -2263,7 +2265,7 @@ public function registerManaged($entity, array $id, array $data)
*/
public function clearEntityChangeSet($oid)
{
unset($this->entityChangeSets[$oid]);
$this->entityChangeSets[$oid] = array();
}

/* PropertyChangedListener implementation */
Expand Down

1 comment on commit ddb647f

@bartrail
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manually adding those fixes to the ODM UnitOfWork works for me :)

Please sign in to comment.