With this the problem seems solved but if I make a pr($this->data); inside beforeSave I get the same wrong behavior and infact then I save the wrong data.
On Jan 14, 11:18 am, grigri <j...@hendersonwebdesign.com> wrote: > Do you have $cacheQueries set to true in the model? This would cause > this behavior. > > Try adding `var $cacheQueries = false` in your model definition. > > hth > grigri > > On Jan 14, 8:53 am, "marco.rizze...@gmail.com" > > <marco.rizze...@gmail.com> wrote: > > I paste my code: > > > function edit($id=-1) > > { > > pr($this->data); // Original Passed Data > > > ...... > > > $object=$this->Document->read(null,$id); > > > ..... > > > pr($this->data); // Data after read operation > > ..... > > > } > > > The original passed data is correct . (Example : $data['Document'] > > ['title']='edited title'); > > Instead in the data after read operation I get that there are the data > > that are read (Example : $data['Document']['title']='not edited > > title' ). > > > On Jan 13, 6:07 pm, brian <bally.z...@gmail.com> wrote: > > > > It's not clear to me what you mean. Can you post an example of that > > > part of your controller action? > > > > On Tue, Jan 13, 2009 at 6:21 AM, marco.rizze...@gmail.com > > > > <marco.rizze...@gmail.com> wrote: > > > > > Hi > > > > I have this problem . > > > > I do a save operation on a model inside an action of my controller. > > > > If i do a read operation on the model of the ID object that I do to > > > > save later I get that the $this->data contains the data that I have > > > > read with read operation. > > > > I have made some errors or there are options to set to avoid this > > > > features? > > > > Many Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---