[symfony-users] Re: Previous version save()

2009-05-28 Thread Rafael Goulart
A suggestion: Create a attribute "oldObject" or something like that; Alter the construct (or the hydration) and put a copy of the object in that attribute. Use it on save method. []'s Rafael Goulart - Brazil On May 27, 5:44 am, HAUSa wrote: > I'm making my own model save() function. In that

[symfony-users] Re: Previous version save()

2009-05-27 Thread Frank Stelzer
Do not know if i got your idea, but maybe this helps. Save the original values in the setter of the model. This will only work, if the model was already hydrated: private $originalTitle = ''; public function setTitle($v) { $this->originalTitle = $v; return parent::setTitle($v); }

[symfony-users] Re: Previous version save()

2009-05-27 Thread Gareth McCumskey
The only way I can think of doing this is to requery the database to get the original values. On Wed, May 27, 2009 at 10:44 AM, HAUSa < jeroen_heeft_behoefte_aan_r...@hotmail.com> wrote: > > I'm making my own model save() function. In that function the > individual fields (like id, title, rank, e