$uses, Containable Behavior, and Model relationship-General question of best practices
I'm just learning cake and am trying to better understand the
relationship between and appropriate use of the $uses variable in a
controller, the Containable Behavior, and of the different Model
relationships ($hasOne, $belongsTo, etc.)
It seems they all influence the scope of a Model->find() call. So how
to do you decide whether you want to use one or the other.
Is it such that the best practice is to always flesh out your Model
relationships as fully as possible, and then only use $uses when
necessary to establish a relationship not present in the Models,
OR Should you keep the model relationships as sparse as possible,
deciding on a case by case basis when to code a Model relationship and
when to use $uses.
And as far as the Containable behavior is concerned, is it best
practice to use it whenever possible to limit the memory usage of a
Model->find() call, or should you use it only when memory becomes an
issue.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home