title: Jpa namedquery with left join fetch
body: <p>this is my namedquery:</p>
  
  <blockquote>
    <p>@NamedQuery(
                    name = "User.findOneWithLists",
                    query = "SELECT u FROM User u "
                            + "LEFT JOIN FETCH u.aTemplates "
                            + "LEFT JOIN FETCH u.bTemplates "
                            + "LEFT JOIN FETCH u.bp "
                            + "LEFT JOIN FETCH u.aCredentials "
                            + "LEFT JOIN FETCH u.st WHERE (st.deleted = false) "
                            + "LEFT JOIN FETCH u.bCredentials "
                            + "LEFT JOIN FETCH u.cl "
                            + "WHERE u.id= :id")</p>
  </blockquote>
  
  <p>My problem is that I get an error when the application starting:</p>
  
  <p><strong>org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: LEFT ....</strong></p>
  
  <p>On the st side there is an annotation </p>
  
  <pre><code>@ManyToOne
   @JoinColumn(name = "st_user")
   private User user;
  </code></pre>
  
  <p>Any idea how can I handle this where clause?</p>