($this->sphere jest instancją Mns\PytaniaBundle\Entity\Sphere)
'class' => 'MnsPytaniaBundle:Category', 'label' => 'w ', 'query_builder' => function(EntityRepository $er) { return $er->createQueryBuilder('c')->select('c')->where('c.sphere', $this->sphere); }));
Otrzymuje błąd:
CODE
Expression of type 'Mns\PytaniaBundle\Entity\Sphere' not allowed in this context.
A zapytanie, które powstało to:
SELECT t0.id AS id1, t0.name AS name2, t0.rank AS rank3, t0.question_number AS question_number4 FROM sphere t0 WHERE t0.id = ? (["2"])
Dlaczego chce pobrać z Sphere zamiast Category?