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

前端 未结 2 572
一生所求
一生所求 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:01

    Read up a bit on query builder. It's easier and different than a sql query. No need for join conditions.

    This (for starters):

    $qb->leftjoin('PriceOrQuality\POQBundle\Entity\Tag','t', 'WITH', 'et.tag = t.id');
    

    Should just be:

    $qb->leftJoin('et.tag','t');
    

    There might be more problems but that will get you started. http://docs.doctrine-project.org/en/latest/reference/query-builder.html

提交回复
热议问题