On Aug 24, 9:48 am, konraddo <[EMAIL PROTECTED]> wrote:
> Hi
> When i set var uses in my controller:
> var $uses = array('CategoryUser', 'Article','Category', 'User');

Hi, You don't need to do that at all unless the models are unrelated
(which going by the names the either are or should be) or you want to
use a different model from the automatic default. See the manual for
more info.

> and override in function
> $this->uses = array(Article, Category);

That will have no effect, the variable is read and processed during
the controller creation.

> even if i set $this->uses = null;
> function will be still work with models which i set in controller

The var $uses obviously doesn't do what you are expecting (although
what you are expecting isn't very clear.)

>
> so in my function i can use User's model
>
> why set uses variable in function doesn't work??

It's too late by then.

>
> it do unnecessary queries, when i set DEBUG = 2 in cake's config file:
> DESCRIBE `users` etc...

That is a necessary part of how cake works, which does not happen when
DEBUG = 0 - google "cakephp DESCRIBE" and you'll find lengthier
explanations.

hth,

AD


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

Reply via email to