title: Lazy Loading with QueryDsl/Hibernate not working
body: <p>/** Parent Entity **/</p>
  
  <pre><code>@Entity
  
  @Table(name = "Parent")
  
  public class Parent {
  
    private static final long serialVersionUID = 1L;
  
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "parentId", unique = true, nullable = false)
    private Integer parentId;
  
  
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "parent")   
    @JsonManagedReference
    private Set&lt;Child&gt; childs = new HashSet&lt;Child&gt;(0);    
  
  }
  </code></pre>
  
  <p>****** The Child Entity ******</p>
  
  <pre><code>@Entity
  
  @Table(name = "Child")
  
  public class Child {
  
  private static final long serialVersionUID = 1L;
  
    @ManyToOne(fetch = FetchType.LAZY, targetEntity = Parent.class)
    @JoinColumn(name = "GuestID")
    @JsonBackReference
    private Parent parent;
  
  }
  </code></pre>
  
  <p><strong>When i tried to retrieve Parent details, it also fetch child record, which should not be happen as i have provided FetchType.LAZY.</strong></p>
  
  <p>*********** DAO Class *******</p>
  
  <pre><code>public class ParentRepositoryImpl implements ParentRepository {
  
    public final List&lt;Parent&gt; retrieveParentList(){
  
      QParent qParent = QParent.parent;
      JPQLQuery&lt;Parent&gt; query = new JPAQuery&lt;Parent&gt;(em);
      List&lt;Parent&gt; parents = query.from(qParent).fetch();
    }
  }
  </code></pre>
  
  <p><strong>Also i want to conditionally (on request) fetch child record, how can i achieve this?</strong> </p>