One more situation in which defining the models upfront helps is when you need to access the related model in your controller. Instead of defining the related model in uses (which was slow for my cases) you can access it using Model->Related which was a bit fast... i dont know why though... :)
Thanks. On Sun, Jan 18, 2009 at 4:03 AM, Adam Royle <[email protected]> wrote: > > Personally I find it easier to define all associations and use > Containable or recursive = -1 to define what data I get back. It's > easier to understand for me and works fairly well, makes it quick to > develop and easy to debug. > > The only potential downside is that every associated model is loaded, > whether or not it is needed. If you have tons of models, all > associated together, then maybe you'll have a few performance issues, > however I've never been in that situation, so maybe someone else could > comment on that. > > Cheers, > Adam > > Chad Casselman wrote: > > Are there any known advantages or disadvantages of > > 1) doing all associations ONLY when needed and only the ones that are > needed > > or > > 2) putting lots of associations in the models and trying to unbind / > contain > > them out of the urls ? > > > > > > Just trying to find a consistent way to get the most out of the > > applications. > > > > Chad > > > -- Thanks & Regards, Novice. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
