this is my namedquery:
@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")
My problem is that I get an error when the application starting:
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: LEFT ....
On the st side there is an annotation
@ManyToOne
@JoinColumn(name = "st_user")
private User user;
Any idea how can I handle this where clause?