Davide

Why not just build the path when selecting the record? (afterFind()
will do). You do not have to duplicate the record's id in the path
column.

If you must work around the framework lifecycle, then direct $model-
>execute('UPDATE blah, blah') calls will work.

~GreyCells

On Apr 17, 1:06 pm, "Davide" <[EMAIL PROTECTED]> wrote:
> 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 cake-php@googlegroups.com
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