title: Display data from a join with missing join class in the respository symfony
body: <p>I'm trying to access data from two classes in ManyToMany .
  The problem is that the relationship is well indicated in each of the entities but the entity that refers to the intermediate table (relational) between these two entities is not defined and suddenly I cannot make my request dql because this error appears:</p>
  <blockquote>
  <p>[Semantical Error] line 0, col 99 near 'App\Entity\LinkQcmQuestion': Error: Class 'App\Entity\LinkQcmQuestion' is not defined.</p>
  </blockquote>
  <p>Most particulary i would like to display questions by qcm ,that is to say :
  display the name of the Qcm in a list of buttons and on click bring up the corresponding questions</p>
  <p>this is entities(only the part concerning the relashionship):</p>
  <blockquote>
  <p>Qcm.php</p>
  <blockquote>
  <p>#[ORM\ManyToMany(targetEntity: Question::class, inversedBy: 'qcms')]
  #[ORM\JoinTable(name: &quot;link_qcm_question&quot;)]
  private $questions;</p>
  </blockquote>
  </blockquote>
  <blockquote>
  <p>Questions.php</p>
  <blockquote>
  <p>#[ORM\ManyToMany(targetEntity: Qcm::class, mappedBy: 'questions')]
  private $qcms;</p>
  </blockquote>
  </blockquote>
  <p>this is the Repository:</p>
  <blockquote>
  <p>QuestionRespository.php</p>
  <blockquote>
  </blockquote>
  </blockquote>
  <pre><code>    public function getQuestionByQcm( )
     {
           $questionBdd = $this-&gt;getEntityManager();
           return $questionBdd-&gt;createQuery('
           SELECT ques.id,q.wording,ques
           FROM App\Entity\Question ques
           INNER JOIN App\Entity\LinkQcmQuestion lqq
           WITH ques.id = lqq.question_id
           INNER JOIN App\Entity\Qcm q
           WITH qcm.id = lqq.qcm_id
           WHEREq.id =:qcm_id
         ')
          -&gt;getResult();
     }
  </code></pre>
  <p>this is the controller:</p>
  <blockquote>
  <p>`</p>
  </blockquote>
  <pre><code>     class InstructorController extends AbstractController  {
       private $repository;
  
       public function __construct(QuestionRepository $repository){
           $this-&gt;repository = $repository;
          }
  
         /**
          * @Route(&quot;instructor/questions&quot;, name=&quot;instructor_display_questions&quot;)
          * @return Response
          */
         public function  DisplayQcm()
         {
     
           $qcm = $this-&gt;qcm-&gt;getQcmByDifficulty();
           $question_test=$this-&gt;repository-&gt;getQuestionByQcm();
     
           return $this-&gt;render('instructor/index.html.twig', [
           'test'=&gt;$question_test
         ]);
     }
  }
  </code></pre>
  <p>`</p>