title: JPA,JPQL: unexpected token: LEFT near line 1
body: <p>I want to display all the checklists that are not answered and not answered (response checklists is in the ResponsesCheckLists table) using the following parameters: idequipement and idMission.</p>
  
  <pre><code>@Query("SELECT check,resp,eq FROM Equipements eq INNER JOIN CheckLists check WHERE eq.idEquipements = check.equipements.idEquipements LEFT JOIN ResponsesCheckLists resp ON check.idCheckLists=resp.CheckLts.idCheckLists AND resp.Respmission.idMission = :idmiss WHERE eq.idEquipements = :idEqp ")
      public List&lt;ResponsesCheckLists&gt; ListCheckListsNonRepondu(@Param("idEqp") long idEqp, @Param("idmiss") long idmiss);
  </code></pre>
  
  <p>After running this query, I displays this error message: </p>
  
  <pre><code>antlr.NoViableAltException: unexpected token: LEFT
  ------
  Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: LEFT near line 1, column 148 [SELECT check,resp,eq FROM com.SSC.DAO.Entities.Equipements eq INNER JOIN CheckLists check WHERE eq.idEquipements = check.equipements.idEquipements LEFT JOIN ResponsesCheckLists resp ON check.idCheckLists=resp.CheckLts.idCheckLists AND resp.Respmission.idMission = :idmiss WHERE eq.idEquipements = :idEqp ]
  ------
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'responsesCheckListsRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract java.util.List com.SSC.DAO.JPARepository.ResponsesCheckListsRepository.ListCheckListsNonRepondu(long,long)!
  </code></pre>
  
  <p><strong>Edit1:</strong></p>
  
  <pre><code>@Query("SELECT check,resp,eq FROM Equipements eq INNER JOIN CheckLists check ON eq.idEquipements = check.equipements.idEquipements"
              + " INNER JOIN ResponsesCheckLists resp ON check.idCheckLists=resp.CheckLts.idCheckLists AND resp.Respmission.idMission = :idmiss AND eq.idEquipements = :idEqp ")
      public List&lt;ResponsesCheckLists&gt; ListCheckListsNonRepondu(@Param("idEqp") long idEqp, @Param("idmiss") long idmiss);
  </code></pre>
  
  <p><strong>Error of Edit1;</strong></p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalStateException: No data type for node: 
    org.hibernate.hql.internal.ast.tree.IdentNode   +-[IDENT] IdentNode:
    'check' {originalText=check}</p>
    
    <p>antlr.SemanticException: Path expected for join!</p>
    
    <p>Caused by: java.lang.IllegalArgumentException: Validation failed for
    query for method public abstract java.util.List
    com.SSC.DAO.JPARepository.ResponsesCheckListsRepository.ListCheckListsNonRepondu(long,long)!</p>
  </blockquote>
  
  <p><strong>Edit2:</strong></p>
  
  <pre><code>@Query("SELECT check , resp , eq FROM Equipements eq INNER JOIN CheckLists check ON eq.idEquipements = check.equipements.idEquipements"
              + " INNER JOIN ResponsesCheckLists resp ON check.idCheckLists=resp.CheckLts.idCheckLists AND resp.Respmission.idMission = :idmiss AND eq.idEquipements = :idEqp ")
      public List&lt;ResponsesCheckLists&gt; ListCheckListsNonRepondu(@Param("idEqp") long idEqp, @Param("idmiss") long idmiss);
  </code></pre>
  
  <p><strong>Errors of Edit2:</strong></p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalStateException: No data type for node:
    org.hibernate.hql.internal.ast.tree.IdentNode   +-[IDENT] IdentNode:
    'check' {originalText=check}
    antlr.SemanticException: Path expected for join!</p>
  </blockquote>
  
  <p>How to correct this query?</p>
  
  <p>thank you in advance</p>