On Wed, Jul 21, 2010 at 9:20 PM, huoxito <[email protected]> wrote:
> Is is possible to access data modified in a Model on callback method
> beforeSave?
>
> I changed the value of a variable on beforeSave method in a model and
> I need to retrieve that new value on my controller. I know i can use
> the read method to get that value, but I was hoping if it's possible
> to do that without any new requests to the database.

Model::save() returns the data:

$data = $this->YourModel->save();

Have a look through the method here to see what all is going on.
http://api.cakephp.org/view_source/model/#line-1209

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to