Hi, I use Entity Graphs with QueryDSL. It works great. But when I use subgraph, Hibernate generate invalid SQL. Here is my sample:
Code:
@NamedEntityGraph(
name="defaultGet",
attributeNodes = {
@NamedAttributeNode("client"),
@NamedAttributeNode(value = "tests", subgraph = "testsSG")
},
subgraphs ={
@NamedSubgraph(
name="testsSG",
attributeNodes = {
@NamedAttributeNode("template")
}
)
}
)
Here is generated SQL:
Code:
select
...correct stuff....
from
iq_applicant applicant0_
left outer join
iq_test tests1_
on applicant0_.id=tests1_.applicant
left outer join
iq_template template2_
on tests1_.template=template2_.id cross
join
//WTF?? empty lane??
left outer join
iq_client client3_
on applicant0_.client=client3_.id
I use hibernate 4.3.1.Final and Postgre SQL 9.3. Is it a bug? Thanks