views:

18

answers:

1

I am trying to generate a migration script using Doctrine with Zend Framework. I am getting the following:

$ php doctrine.php generate-migrations-diff
$ PHP Fatal error:  Cannot redeclare class Avo_Model_AccessType in 
$ tmp/fromprfx_doctrine_tmp_dirs/AccessType.php on line 16

I can successfully build the models form the yaml file. I am using Zend Framework 1.10.5 and Doctrine 1.2.2 I think the issue might be with the autoloader and the fact that Zend Autoloads the classes that doctrine is trying to re-create.

A: 

I've got the same error today. The problem was that in bootstrap I preloaded all models with

Doctrine_Core::loadModels($options['models_path']);

So, I just removed that line and it helped.

Memphys