$tip->setGame($em->getRepository('XXXBundle:Game')->find($id));
$form = $this->createFormBuilder($tip)->add('player', 'entity', array(
'class' => 'XXXBundle::FootballPlayer',
/*'query_builder' => function(\XXX\XXXBundle\Entity\FootballPlayerRepository $er)
{
$er->findByCurteam($team->getName());
},*/
))->getForm();
(not really using 'XXX' in my code) error:
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
seems the Entity class is not found - strange