开发者

Doctrine - BaseClassName Not found

I'm trying to setup doctrine in my project and whenever I call on a class, e.g.

$dealer = Doctrine_Core::getTable( 'Dealers' ).find(1);

Then I get Fatal Error: Class BaseSchools not found.

I know those files exist, since I did Doctrine_Core::generateModelsFromDb and I can see them

Somehow my paths to my models/generated folder aren't being told to my Dealers class.

In my bootstrap.php file I have:

Doctrine::loadModels( array( WWWROOT_PATH . 'models/generated', WWWROOT_PATH . 'models') );

I don't get any errors, if I change the path to the wrong path, it throws an error so I'm assuming that i'm doing it cor开发者_StackOverflowrectly.

Anyway any thoughts would be appreciated.


It ended up being that I didn't include this line in my boostrap file:

spl_autoload_register( array('Doctrine', 'autoload' ) );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜