title: JPA 2.1 Entity Graph returns duplicated results
body: <p>I started using the new entity graph feature in JPA 2.1 to specify the Lazy collections that must be loaded.
  Consider following classes: </p>
  
  <pre><code>@Entity
  @NamedQueries({
      @NamedQuery(name="findWithFilterAttr","select a from A a where a.filterAttribute like :filter")
  })
  @NamedEntityGraphs({
  @NamedEntityGraph(name = "graph.childs", attributeNodes = @NamedAttributeNode("childs"))})
  public class A{
    @Id
    private long id;
    @OneToMany(mappedBy="parent")
    private List&lt;B&gt; childs;
    private String filterAttribute;
  }
  @Entity
  public class B{ 
    @Id
    private long id;
    @ManyToOne
    private A parent;
  }
  </code></pre>
  
  <p>When I execute the named query to obtain a list of A entities with the entity graph hint I get a collection with repeated A entities.
  How can I load the A entities only once.</p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Hibernate 4.3.5</li>
  <li>Wildfly 8.1</li>
  </ul>