You shouldn't set models at the AppController level.

>From this post:

http://groups-beta.google.com/group/cake-php/browse_thread/thread/df5e0b3a75
d0202a

Larry says:

"You should not define the $uses var in your AppController. 

When you set the $uses var it should be done in child classes, and only set 
if you are not following naming conventions, or you need more then one model

in the controller. 

If you follow naming convention loading of models is automatic and you do 
not have to define the $uses var. Adding to your AppController sets the same

$uses on all child classes."

Also be aware of CakePHP 1.1.11.4064 regarding models:

If you did something like this before 1.1.11.4064:

$myModel =& new Model();

You now have to do:

loadModel('Model');
$myModel =& new Model();

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de Claudio Poli ?
Enviado el: Lunes, 04 de Diciembre de 2006 01:39 p.m.
Para: Cake PHP
Asunto: Re: CakePHP 1.1.11.4064, thawed and redelivered better than before.


I'm having some problem..
In an application I've loaded a bunch of model into app_controller.php
like
var $uses = array('Blah', 'Etc');
to be available in every controller; after the upgrade into every
controller I go CakePHP tells me that he wants a model with the same
name as the controller.
for example I've a Welcome controller that do not have any model but
uses an Article model.

what's going wrong here?

thanks


--~--~---------~--~----~------------~-------~--~----~
 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