Maybe you could overload the afterSave callback (method) of the model you are trying to make changes to its data.
On Sep 6, 1:30 pm, MarcS <[EMAIL PROTECTED]> wrote: > Hi, > > I have trouble understanding why the Model::data array is being set to > false after saving the model. > Many times I need to save the model (for example because I need the > insert Id to work with a associated model) but after that I still need > to make changes the Model's data. > > I find myself doing something like > $save_data = $this->Model->save(); > $save_data['Model']['id'] = $this->id; > $this->Model->create($save_data) > > all the time. > > Is there a good way to get around that? > Am I doing something very stupid here? > > thanks, > Marc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
