开发者

How to upgrade from Doctrine 1.1.4 to Doctrine 1.2.3 in Zend?

开发者 https://www.devze.com 2023-02-16 19:18 出处:网络
I am trying to upgrade Doctrine in my Zend application. I changed the line in my bootstrap file to point to Doctrine 1.2.3

I am trying to upgrade Doctrine in my Zend application. I changed the line in my bootstrap file to point to Doctrine 1.2.3

    // Autoload Doctrine ORM
    require_once(LIBRARY_PATH.'/Doctrine-1.2.3/Doctrine.php');
    spl_autoload_register(array('Doctrine', 'autoload'));

But I get an error when accessing the application in the browser;

Fatal error: Class 'BaseUser' not found in C:\xampplite\htdocs\SECGearbox\开发者_如何学Pythonapplication\models\User.php on line 14.

Seems like the models can't be found.

I'm not quite sure where to proceed from here.

Appreciate the help.


Personally I use the ZFDoctrine integration libraries from beberlei for my Zend Framework 1x and Doctrine 1.2 projects. They provide nice integration between the two and make it easy to use the Zend_Tool command line for Doctrine tasks.


In order to autoload models in Doctrine 1.2 the following line has to be added:

spl_autoload_register(array('Doctrine_Core', 'modelsAutoload'));

This line is added after the two lines I mentioned in my question.

0

精彩评论

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