On Jan 10, 8:38 am, "Tony Lambiris" <[EMAIL PROTECTED]> wrote:
> The way my app works is I have three tables: users, systems and games.
>
> users relates to systems
> systems relates to games
> users does not relate directly to games
>
> When I am in my User controller, I want to be able to issue a command
> like this:
> $this->User->System->find("ps3")
> and have it return a list of games based off PK systems.id (which
> equals games.system_id).
>
> In my models (user.php, system.php and game.php), I have the following
> (respectively):
>
> class User extends AppModel {
>   var $name = 'User';
>   var $hasMany = array('System');
>
> }class System extends AppModel {
>   var $name = 'System';
>   var $hasMany = array('Game');
>   var $belongsTo = array('User');
>
> }class Game extends AppModel {
>   var $name = 'Game';
>   var $belongsTo = array('System');
>
> }When I try to access my User controller, I get the error:
>
> Fatal error: Class 'Game' not found in
> /vhosts/site/cake_1.1.12.4205/cake/libs/model/model_php5.php on line
> 438
>
> Any ideas? Im kinda new to the MVC world, so it's kind of confusing to
> me. I read some where scaffolding helps sort these out visually.
>
> TIA.

Hi Tony,

Your game model file is present but the class within it is either
misspelt or otherwise not declrared.

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :) You may get your answer quicker by asking on
the IRC Channel (you can access it with just a browser
here:http://irc.cakephp.org).


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