Symfony/Doctrine: Class is not a valid entity or mapped super class

前端 未结 2 545
一生所求
一生所求 2021-01-14 04:47

I\'m getting the \"Class PriceOrQuality\\POQBundle\\Entity\\Tag is not a valid entity or mapped super class error. I\'ve have checked all the answers to similar questions, b

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-14 05:22

    Found the issue.

    I had a //@todo after the meta definition and before the class definition. Apparently that screwed up the mapping, as it was not mapped in doctrine.

    Moving the //@todo and rerunning the mapping fixed the problem.

    For whomever finds this question with similar problems try running:

    php app/console doctrine:mapping:info
    

    It will show you if you have problems in the mapping structure in doctrine

    Thanks for your time guys.

    Cheers, Rune

提交回复
热议问题