0
$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

1 Answer 1

1

Something is strange in your code: 'class' => 'XXXBundle::FootballPlayer', are you sure :: exist? Never seen it, seems like a mistake (maybe can provoke the error).

After testing, yes, it's because of the double :: replace by :: 'class' => 'XXXBundle:FootballPlayer',.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.