Miles-
Try -
App::import('Model', "_insert_model_name");
Brad
On Jan 10, 6:08 pm, Miles J <[email protected]> wrote:
> In one of my controllers, I use nearly 10-15 models. The problem is
> that I dont need all these models, each model is respective to a
> certain action and loading all these models seems like it would be
> heavy and load slowly.
>
> So I tried doing many variations of this in the action:
>
> $this->uses = 'Friend';
> $this->uses[] = 'Friend';
> $this->uses = array('Friend');
>
> But none of that works, but im guessing its because models are loaded
> before the action. Now all I ask is if there is a way to load certain
> models depending on different actions, instead of loading them all.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---