1

CodeIgniter 2 +Doctrine2の「バニラ」インストールがあります。

私のチュートリアルEntity.User.dcm.ymlおよびEntity.Article.dcm.ymlファイルは、/ php doctrine-cli.php orm:generate-entitiesモデルおよびphp doctrine-cli.php orm:generate-を介してCLIで正常に機能しました。プロキシ大騒ぎも問題もありません。

しかし、カエルになって新しいProject1.User.dcm.ymlとProject1.cartdata.dcm.ymlを作成することにしたとき、生成エンティティは問題なく通過しましたが、生成プロキシを実行すると、次のようになりました。

警告:class_parents():クラスProject1 \ Usersが存在せず、40行目の/../applicationFolder/libraries/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.phpにロードできませんでした

警告:array_reverse()は、パラメーター1が配列であると想定しています。ブール値は/../applicationFolder/libraries/Doctrine/ORM/Mapping/ClassMetadataFactory.phpの231行目にあります。

警告:/../applicationFolder/libraries/Doctrine/ORM/Mappingのforeach()に無効な引数が指定されました

たくさんいじくり回してみました。Entities.Project1.User.dcm.ymlなどの名前を付けてみましたが、うまくいきませんでした。チュートリアルのエンティティファイルに戻ると、すべて正常に機能します。私が知る限り、細かい内部が一貫していることを確認しProject1\Userました。

シンプルで簡単なものが欠けていますか?または、これらを許可するために教義を取得するために必要な他の構成変更はありますか?

4

1 に答える 1

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();
于 2012-04-07T04:39:15.573 に答える