2012-04-07 166 views
1

我有一个“香草”安装笨2 + 2原则ReflectionException,类名 SUBNAME不存在

我的教程Entity.User.dcm.yml和Entity.Article.dcm.yml文件的工作只是通过/ php doctrine-cli.php orm:生成实体模型和php doctrine-cli.php orm:生成代理没有大惊小怪,没有问题。

但是,当我小青蛙,并决定将新Project1.User.dcm.yml和Project1.cartdata.dcm.yml我通过生成实体好了,但是当我跑生成的代理我:

警告:class_parents():类PROJECT1 \用户不存在,并且不能在/../applicationFolder/libraries/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php加载在线40

警告:array_reverse()期望参数1是数组,布尔在/../applicationFolder/libraries/Doctrine/ORM/Mapping/ClassMetadataFactory.php中给出231行

警告:/../applicationFolder/libraries/Doctrine/ORM/Mapping

为的foreach()提供的无效参数我试图吨的修修补补,我试图使名Entities.Project1.User.dcm .yml和类似的,但没有运气。如果我回到我的教程实体文件,那么它一切正常。我确信精致的内部结构是一致的,据我所知,Project1\User等等

我是否缺少一些简单易用的东西?还是有一些其他配置更改需要获得这些原则?

回答

1

在Doctrine.php:

// load the entities 
    $entityClassLoader = new \Doctrine\Common\ClassLoader('Entities', APPPATH.'models'); 
    $entityClassLoader->register(); 
    $entityClassLoader = new \Doctrine\Common\ClassLoader('MyNamespace1', APPPATH.'models'); 
    $entityClassLoader->register(); 
    $entityClassLoader = new \Doctrine\Common\ClassLoader('MyNamespace2', APPPATH.'models'); 
    $entityClassLoader->register(); 
相关问题