-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: SQL syntax error when using Entity graph - bug?
PostPosted: Wed Feb 26, 2014 11:35 am 
Newbie

Joined: Wed Feb 26, 2014 10:36 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.