Hi.
How do you create your query? It appears that for some reason your query isn't serialized properly. Hibernate uses with instead of on.
But the central problem is that JPQL doesn't support joins between top level variables. You need to express it in a different way, e.g. subqueries, if you only need constraints.
Br,
Timo
On Monday, November 12, 2012 11:09:07 AM UTC+2, Georgian Micsa wrote:
Hi,
I have 2 entitites, let's say A and B and there is no relation between them.
I want a query that left outer joins them on the id, so I tried the following:
query.from(A).leftJoin(B).with(A.id.eq(B.id));
The generated JPQL looks like this:
and there is the following exception:
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: on near line ...
Is it possible to do this in QueryDSL or JPQL (the on seems not to be a valid JPQL keyword).
We are using Hibernate 4.1.7 and querydsl 2.8.0.
Thanks,
Georgian