SQLGrammarException while executing a entity graph with subgraphs

Description

Currently, I am testing EntityGraphs with Hibernate and I found a bug. I've created a simple query and a graph with attributes nodes and subgraphs. I Connected both elements with a "fetchgraph" query hint. Here's my sample code

While executing, Hibernate throws follow exception

Hibernate generated follow SQL-Statement (which contains a comma between two left-join clauses)

I've created also a testcase as a pull request on GitHub.

Environment

JDK 1,7, DB2, JEE7

Activity

Show:
Andrea Boriero
September 19, 2014, 2:22 PM

testcase file

Gail Badner
March 19, 2015, 5:20 AM

I have a proposed fix this this, but I'm seeing the same sort of duplicated columns that I saw in when the same element collection is explicitly referenced in an HQL statement and in an EntityGraph.

I don't think this fix causes this duplication, but I will look into it further.

Gail Badner
March 20, 2015, 4:41 AM

I've verified that the duplicates columns occur with plain HQL. They are not caused by the EntityGraph.

I've created a pull request: https://github.com/hibernate/hibernate-orm/pull/913

Gail Badner
March 20, 2015, 8:05 PM

Fixed in master and 4.3 branches.

, thanks for the unit test, and thanks, , for simplifying the test case!

Gail Badner
April 15, 2015, 9:48 PM

Closing in preparation of releasing 4.3.9.Final and 4.2.19.Final.

Assignee

Gail Badner

Reporter

Baris Cubukcuoglu

Fix versions

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure