title: Symfony/Doctrine: Class is not a valid entity or mapped super class
body: <p>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, but I cannot seem to grasp the problem.</p>
  
  <p>The error is thrown by my Repository Class</p>
  
  <pre><code>&lt;?php
  
  namespace PriceOrQuality\POQBundle\Entity\Repository;
  
  use Doctrine\ORM\EntityRepository as ER;
  use PriceOrQuality\POQBundle\Entity\Tag;
  use Doctrine\ORM\EntityManager;
  
  /**
   * EntityTagsRepository
   *
   */
  class EntityTagsRepository extends ER
  {
      public function getTagsForTagCloud($entity_ids = null, $tag_id = null) {
  
          $em = $this-&gt;getEntityManager();
  
          $qb = $em-&gt;createQueryBuilder();
          $qb-&gt;select(array('IDENTITY(et.tag) as id, COUNT(et.tag) as tag_id_count, LOWER(t.tag) as tag'));
          $qb-&gt;from('PriceOrQuality\POQBundle\Entity\EntityTag', 'et');
          $qb-&gt;leftjoin('PriceOrQuality\POQBundle\Entity\Tag','t', 'WITH', 'et.tag = t.id');
          $qb-&gt;groupBy('et.tag');
          $qb-&gt;addOrderBy('tag_id_count','DESC');
          $qb-&gt;setMaxResults(20);      
          return $qb-&gt;getQuery()
                  -&gt;getResult();
      }
  }
  </code></pre>
  
  <p>The Tag class is defined in this file (Tag.php) (definition only):</p>
  
  <pre><code>&lt;?php
  
  namespace PriceOrQuality\POQBundle\Entity;
  
  // src/PriceOrQuality/POQBundle/Entity/Tag.php
  
  use Doctrine\ORM\Mapping as ORM;
  use Doctrine\Common\Collections\ArrayCollection;
  use PriceOrQuality\POQBundle\Entity\EntityTag;
  use PriceOrQuality\POQBundle\Entity\User;
  use JMS\SerializerBundle\Serializer\Serializer;
  
  /**
   * @ORM\Entity(repositoryClass="PriceOrQuality\POQBundle\Entity\Repository\TagsRepository")
   * @ORM\Table(name="tags")
   * @ORM\HasLifecycleCallbacks 
   */
  </code></pre>
  
  <p>Does any of you smart guys have any idea on where to start with the debugging?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Rune</p>