Davide wrote:
> ...
> I'm trying to use the afterSave callback in order to update a field of a
> just inserted record.
>
> I have this code[1]. If I didn't comment the saveField() statement, the
> browser (FireFox) will complain saying[2].
> ...

Finally after some logging I found what it is. It's a sort of loopback. If
in afterSave I try to update a field, the lifecycle (before, save, after)
restart. This until the pages goes to timeout.

So actually it's not possible to update a record in the afterSave
loopback. In order to solve it, I've moved the saveField() in the
controller method after the if($this->Model->save()).

Is this a framework bug/feature? Is this an application design mistake?
With application I mean my application, not the framework. Will make it
sense to be able to specify for example a parameter to the afterSave
callback in order to tell to the framework to skip the natuaral save
lifecycle?

Thanks a lot
Bye
Davide




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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