title: JPA bidirectional mapping not fetching deep mapped data
body: <p>I have the following JPA entities with bidirectional mapping. I'm trying to fetch all the featureGroup into a DTO.</p>
  
  <p>If I do findAll at featureGroup and iteratinng to get its features. Its not coming. I'm not yet more familiar with JPA. Is my approach is correct?</p>
  
  <p>Below are my entities.</p>
  
  <pre><code>@Entity
  @Table(name="application")
  @Data
  class Application{
      @Id @GeneratedValue(strategy=GenerationType.IDENTITY) id;
      name;
      @OneToMany(mappedBy="application") 
      private Set&lt;AppFeatureGroup&gt; appFeatureGroup;
  }
  </code></pre>
  
  <p>then</p>
  
  <pre><code>@Entity
  @Table(name="appfeaturegroup")
  @Data
  class AppFeatureGroup {
      @Id @GeneratedValue(strategy=GenerationType.IDENTITY) id;
      title;
      @OneToMany(mappedBy="appfeaturegroup")
      private Set&lt;AppFeature&gt; appFeature;
      @ManyToOne(cascade=CascadeType.ALL) @JoinColumn(name="id", insertable=false, updatable=false)
      private Application application;
  }
  </code></pre>
  
  <p>then</p>
  
  <pre><code>@Entity
  @Table(name="appfeature")
  @Data
  class AppFeature{
      @Id @GeneratedValue(strategy=GenerationType.IDENTITY) id;
      title;
      @OneToMany(mappedBy="appFeature")
      private Set&lt;AppSubFeature&gt; appSubFeature;
      @ManyToOne(cascade=CascadeType.ALL) @JoinColumn(name="id", insertable=false, updatable=false)
      private AppFeatureGroup appFeatureGroup;
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Entity
  @Table(name="appsubfeature")
  @Data
  class AppSubFeature{
      @Id @GeneratedValue(strategy=GenerationType.IDENTITY) id;
      title;
      @ManyToOne(cascade=CascadeType.ALL) @JoinColumn(name="id", insertable=false, updatable=false)
      private AppFeature appFeature;
  }
  </code></pre>
  
  <p>then</p>
  
  <p>I try to get the objects like below:</p>
  
  <pre><code>List&lt;AppFeatureGroup&gt; appFeatureGroupList = appFeatureGroupRepository.finAll()
  //Also tried from Application application = findById(id) and from application also I tried to get the deep objects
  
  for(AppFeatureGroup appFeatureGroup : appFeatureGroupList){
      //I get id and title. But,
      Set&lt;AppFeature&gt; appFeature = appFeatureGroup.getAppFeature();//This is empty    
  }
  </code></pre>
  
  <p>Is it not correct what I implemented is? I tried with <code>fetch=FethType.EAGER</code> also. But still not working.</p>