Model not found?

2010-02-21 Thread Thau
Hi, I created a Controller called battles_controller.php and a model called battle.php. There is a function in the model called GetStats. I tried to call this function with: $this-Battle-GetStats(); I got error: Notice (8): Undefined property: BattlesController::$Battle [APP/

Re: Model not found?

2010-02-21 Thread John Andersen
Are your controller missing the $uses definition, with which you tell the controller, that it should use a model? See the CakePHP book at: http://book.cakephp.org/view/53/components-helpers-and-uses [code] var $uses = array('Battle'); [/code] Enjoy, John On Feb 21, 5:40 pm, Thau

Re: Model not found?

2007-08-20 Thread Jon Bennett
Right on! I have a list of nine other models used by the talent_controller and I had forgotten to add the TalentDelail model to the list! do you need to load all these models directly? If they have associations set up, you should only need a couple in Uses, and the rest will be available via

Model not found?

2007-08-19 Thread peterhf
A table in the db: talent_details The model: class TalentDetail extends AppModel { var $name = 'TalentDetail'; var $primaryKey = 'recordID'; } In the controller talent_controller: $this-TalentDetail-id = 10; $result = $this-TalentDetail-exits(); Result: Fatal error: Call to undefined

Re: Model not found?

2007-08-19 Thread housebolt
The name of your model doesn't correspond with your controller. Your controller name should be talent_detail_controller if you want to keep it that way, but I'm guessing you want it to show up in your browser as /talent/. So, in order to fix this you'll want to add $uses =

Re: Model not found?

2007-08-19 Thread peterhf
Right on! I have a list of nine other models used by the talent_controller and I had forgotten to add the TalentDelail model to the list! The devil is in the details!! Thanks for your help. Peter - On Aug 19, 3:40 pm, housebolt [EMAIL PROTECTED] wrote: The name of your model doesn't

Re: model not found .. inflection problem?

2007-03-23 Thread lamacq
On Mar 22, 9:02 pm, Samuel DeVore [EMAIL PROTECTED] wrote: So sometimes when I want to know how the inflector works on things i make a test view like http://bin.cakephp.org/view/455901280 Good idea, thanks! I used your view with my table/class/filename and here's the output I get:

Re: model not found .. inflection problem?

2007-03-23 Thread lamacq
On Mar 23, 1:31 am, aerosmith [EMAIL PROTECTED] wrote: I think you must create your controller as the following: //app\controllers\trading_systems_controller_controller.php class TradingSystemsController extends AppController { var $name = 'TradingSystems'; } take a look at your

Re: model not found .. inflection problem?

2007-03-23 Thread lamacq
Can you paste your controller? Specifically, the class variables. Not sure what you mean by class variables. Here's the entire controller: ?php class TradingSystemsController extends AppController { var $scaffold; //var $uses = array('TradingSystem'); function index() {

Re: model not found .. inflection problem?

2007-03-23 Thread aerosmith
Most Welcome... Regards Raffi On Mar 23, 7:40 pm, lamacq [EMAIL PROTECTED] wrote: On Mar 23, 1:31 am, aerosmith [EMAIL PROTECTED] wrote: I think you must create your controller as the following: //app\controllers\trading_systems_controller_controller.php class TradingSystemsController

model not found .. inflection problem?

2007-03-22 Thread lamacq
://localhost/trading_systems/ I get this message: Missing Model No class found for the Tradingsystem model And it wants me to create this class in app\models\tradingsystem.php: ?php class Tradingsystem extends AppModel { var $name = 'Tradingsystem'; } But I already have ?php class

Re: model not found .. inflection problem?

2007-03-22 Thread Langdon Stevenson
Hi lamacq My guess is that there is an inflection problem, and that Cake is getting confused by the S on the start of the 'System' part of the name. I can't offer any suggestions as to why though. I have never studied the inflection system, but I have come across inflection issues in the

Re: model not found .. inflection problem?

2007-03-22 Thread Chris Lamb
lamacq [EMAIL PROTECTED] wrote: Any ideas? Can you paste your controller? Specifically, the class variables. -- Chris Lamb, Leamington Spa, UKGPG: 0x634F9A20 signature.asc Description: PGP signature

Re: model not found .. inflection problem?

2007-03-22 Thread Samuel DeVore
So sometimes when I want to know how the inflector works on things i make a test view like http://bin.cakephp.org/view/455901280 in the views/pages On 3/22/07, Chris Lamb [EMAIL PROTECTED] wrote: lamacq [EMAIL PROTECTED] wrote: Any ideas? Can you paste your controller? Specifically,

Re: model not found .. inflection problem?

2007-03-22 Thread aerosmith
. I've got a table named trading_systems, a controller named TradingSystemsController in controllers/ trading_systems_controller.php, and my model is named TradingSystem and is in the file models/trading_system.php. When I accesshttp://localhost/trading_systems/I get this message: Missing Model