I'm sure the devs have their reasons and they can explain it. My personal thoughts are that they had to choose one or the other. Either the model has last say or the behaviors do. To say "the model could always change the data afterwards" like models have minds of their own and could overwrite your data at their slightest whim seems somewhat dramatic. Switch the words models and behaviors and you could make it sound just as unreliable. Remember, this is your application your building. You write the code. You decide whether your model behaves reliably.
On Thu, Jul 17, 2008 at 2:23 PM, fiorentino <[EMAIL PROTECTED]> wrote: > > Could anyone explain me, why the beforeSave method of a behavior is > called before the beforeSave method of the model? > > This seems pretty strange, as it would for a model be possible to > change the saving data after the behavior beforeSave method was > executed. That means data designted to save could not be checked/ > changed reliably by the behavior as the model could always change the > data afterwards. > > Does anyone know the reasons for this structure? > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
