On Thu, Jul 17, 2008 at 10:49 AM, clrockwell
<[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> For one of my controllers I declare var $uses with 6 total values.
> What I see is that on every action within the controller, all 6 are
> 'described' which uses more resources than needed.

Well, the correct use of $uses (hey, I made a pun) depends on how
you've setup relationships between your models.  If all the models you
need to use for a controller are related, you might only need to have
the "parent" model in your $uses array, and then you can reference the
other ones like:

$this->Foo->Bar->find('list');

etc.

You can also use App::import(...) to instantiate models on the fly.

Just my experience, that's all.

-- 
Chris Hartjes
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to