Re: Problem on save operation

2009-01-14 Thread marco.rizze...@gmail.com

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  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"
>
>  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  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
>
> > >  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
-~--~~~~--~~--~--~---



Re: Problem on save operation

2009-01-14 Thread grigri

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"
 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  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
>
> >  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
-~--~~~~--~~--~--~---



Re: Problem on save operation

2009-01-14 Thread Miles J

Can you paste your whole action? Still a bit lost what the problem is.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Problem on save operation

2009-01-14 Thread marco.rizze...@gmail.com

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  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
>
>  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
-~--~~~~--~~--~--~---



Re: Problem on save operation

2009-01-13 Thread brian

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
 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
-~--~~~~--~~--~--~---



Problem on save operation

2009-01-13 Thread marco.rizze...@gmail.com

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
-~--~~~~--~~--~--~---