I'm using EntityGraphs to create a loadgraph to be used for a fetch.
The entity graph goes 2-3 levels deep on some objects, including subgraphs.
The generated SQL on the select query contains a couple of comma's (,) between some of the left outer joins that cause the query to fail.
Please not that when I remove the subgraph and don't go more than 1 level deep, the problem goes away.
The Graph on the main object looks like this:
And this is the SQL it generates, notice how 2 of the join lines have a trailing comma:
Oracle Driver ojdbc6
Same effekt with this EntityGraph:
I think the problem is at org.hibernate.hql.internal.ast.SqlGenerator, line 328
The expression " right.getRealOrigin() == left" is false and the writeCrossJoinSeparator function is called.
SQL Query is:
Closing – no test case provided and no further responses.