1
Doctrine Mongoドキュメントクラスのゲッタ/セッタを生成しようとしています。Symfony2 + Doctrine MongoDMドキュメント生成の問題
文書のコードは次のようになります。
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@ReferenceOne" in property Site\GameBundle\Document\Game::$user was never imported. Did you maybe forget to add a "use" statement for this annotation?
この1つは持っている:私はCLI command php app/console doctrine:mongodb:generate:documents SiteGameBundle
を使用してゲッターとセッターを生成しようとすると、しかし
namespace MySite\GameBundle\Document;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use MySite\GameBundle\Document\User;
/**
* @MongoDB\Document
*/
class Game {
/**
* @ReferenceOne(targetDocument="User")
*/
protected $user;
/** @Date */
protected $start_time;
}
を、私は戻って、次の取得名前空間の観点から私はすべてが適切に含まれていると思うので、私は困惑した。