title: JPA 2.1 Entity graph's subgraphs generating empty joins
body: <p>I am using a new feature in JPA 2.1 called <a href="http://docs.oracle.com/javaee/7/tutorial/doc/persistence-entitygraphs001.htm" rel="nofollow">Entity Graphs</a> with <a href="http://www.querydsl.com/" rel="nofollow">QueryDSL</a>. It's working great. But when I use <a href="https://github.com/hantsy/ee7-sandbox/blob/master/jpa/entitygraph/src/main/java/com/hantsylabs/example/ee7/jpa/Post.java" rel="nofollow">subgraph</a>, JPA generate invalid SQL. Here is my sample:</p>
  
  <pre><code>@NamedEntityGraph(
       name="defaultGet",
       attributeNodes = {
            @NamedAttributeNode("client"),
            @NamedAttributeNode(value = "tests", subgraph = "testsSG")
       },
       subgraphs ={
            @NamedSubgraph(
                 name="testsSG",
                 attributeNodes = {
                      @NamedAttributeNode("template")
                 }
            )
       }
  )
  </code></pre>
  
  <p>Here is generated SQL:</p>
  
  <pre><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 
  </code></pre>
  
  <p>What is that empty lane doing in there? Is this a bug?</p>