problème avec repository Query
bonjour ,
je veux faire Quiz avec Symfony bon j'ai creer 3 entity (Quiz,Question,Choix).
https://s3-eu-west-1.amazonaws.com/s...upload/1aa.png
je veux afficher les choix associer au question je sais pas comment faire voici ce que j'ai fait
Code:
1 2 3 4 5 6 7 8
| public function voirQuizAction($id)
{
$em = $this->getDoctrine()->getManager();
$quiz = $em->getRepository('ITLessonsQuizBundle:Quiz')->find($id);
$listQuestions = $em->getRepository('ITLessonsQuizBundle:Question')->findBy(array('quiz' => $id));
$listChoix = $em->getRepository('ITLessonsQuizBundle:Choix')->findBy(array('question' => ? ));
return new Response('test');
} |