title: Symfony2 error when trying to create entity field in form
body: <pre><code>$tip-&gt;setGame($em-&gt;getRepository('XXXBundle:Game')-&gt;find($id));
          $form = $this-&gt;createFormBuilder($tip)-&gt;add('player', 'entity', array(
          'class' =&gt; 'XXXBundle::FootballPlayer',
          /*'query_builder' =&gt; function(\XXX\XXXBundle\Entity\FootballPlayerRepository $er)
          {
            $er-&gt;findByCurteam($team-&gt;getName());
          },*/
      ))-&gt;getForm();
  </code></pre>
  
  <p>(not really using 'XXX' in my code)
  error:</p>
  
  <blockquote>
    <p>Warning: class_parents(): Class XXX\XXXBundle\Entity\ does not exist
    and could not be loaded in
    D:\www\xxx\xxx\vendor\doctrine\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php
    line 223</p>
  </blockquote>
  
  <p>seems the Entity class is not found - strange</p>