What I understand from the manual is that if the model you need to
access is associated with the current controller's model, you don't
need to add it to $uses. Also that you don't need to add the current
controller's model to $uses unless you have added another model, in
which case it becomes nece
Just to add to the conversation...
You have to ask yourself, "when do I need this model?"
If you are going to need it in every web request, then stick it in the
$uses property.
If you only going to use it in one method, then register it on the fly.
That way, your not bogging down every other
What euromark said. If the model is the primary usage within the
controller, I use the $uses and any associations off of the user. If I
really need an external model, I would use loadModel().
For example in a users controller, only user would be in $uses.
On Dec 19, 4:31 pm, euromark wrote:
> I
I use var $uses for the primary model of the controller
e.g.
Posts => uses Post
Contact => uses Tools.Contact (Plugin model)
MembersController => uses User
Account => uses User
etc
I also think this is the normal use case for this property and would
never put more than one model into it.
The main
Is there ever a time when it is considered best practices to use var
$uses for access to a model from a controller. The cakephp manual
seems to say to use $this->Model->AssociatedModel when there is an
association and $this->loadModel('UnassociatedModel') when there
isn't. Does var $uses not appe