Mmmm...this sounds cool but i couldn't find any trace of the attach and detach functions in the model class (or any of the above classes), even though I'm with SVN up at 6457. The call off detach/attach results in executing the query detach/attach which is obviously incorrect.
On Feb 14, 3:16 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Yes, a save() will always trigger behavior's afterSave(). > > One thing you can do is SVN up and then from your behavior do: > > $settings = $this->settings[$Model->alias]; > > $Model->detach('MyBehavior'); > $Model->save( ... ); > $Model->attach('MyBehavior', $settings); > > -MI > > --------------------------------------------------------------------------- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -----Mensaje original----- > De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre > de [EMAIL PROTECTED] > Enviado el: MiƩrcoles, 13 de Febrero de 2008 09:05 p.m. > Para: Cake PHP > Asunto: Never-ending loop in behaviors afterSave? > > If in the afterSave function of a behavior i make other saves in the > save model, does the afterSave function gets called again for each > save, and then again and again? > If yes, is there a way to perform the save from the inside the > afterSave function so that this will ignore the behavior (itself)? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---