2012-04-07 6 views
1

存在しません。私はCodeIgniterの2 +教義のインストール2.ReflectionException、クラス名サブ名は

私のチュートリアルEntity.User.dcm.ymlとEntity.Article.dcm.ymlファイルだけで働いていた「バニラ」を持っていますCLIでは、/ php doctrine-cli.php orm:generate-entitiesモデルとPHP doctrine-cli.php orm:generate-proxiesを使ってうまくいきます。

しかし、私はカエルを持って、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 on line 231

警告:foreachのために供給無効な引数()/../applicationFolder/libraries/Doctrine/ORM/Mapping

私は名前Entities.Project1.User.dcmを作ってみました、工夫のトンを試してみました.ymlと同様ですが、運はありません。チュートリアルのEntitiesファイルに戻ってみると、うまくいきます。私は細かい内部が一貫していることを確認しました。私が言うことができる限り、Project1\Userなど

シンプルで簡単なものがありますか?あるいは、これを可能にするためにdoctrineを得るために必要な他の設定変更がありますか? Doctrine.phpで

答えて

1

// 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();