RSS - Latest posts Multiple changes and a delete on same object in doctrine

Home » 2010 » 03 » Multiple changes and a delete on same object in doctrine

If you want to make several different changes to a doctrine record object you might find yourself slightly puzzled when it comes to deleting related objects.

$user['Address']->delete();
$user['Address']->state(Doctrine_Record::STATE_LOCKED);
(...)
$user->save();

It seems that unless you set the state the save later on still sees an initialized (though empty!) relation.

 

You can leave a response, or trackback from your own site.

Add Comment