title: How to get Hibernate FetchProfile to load deep child objects in the hierarchy
body: <p>I have the same question as someone posted in the Hibernate Community: <a href="https://forum.hibernate.org/viewtopic.php?f=1&amp;t=1006076&amp;start=0">FetchProfiles</a>.</p>
  
  <p>For performance reasons I have a relationship in the data model as follows:</p>
  
  <pre><code>...C -[FetchType.LAZY]-&gt; D -&gt; [FetchType.LAZY] -&gt; E
  </code></pre>
  
  <p>Using FetchProfile I can eagerly load D with C, but I can't figure out how to eagerly load E. I know I can successfully use a NamedQuery using inner joins, but it really bugs me that I can't work out how to do it using FetchProfile. An example of an attempted FetchProfile (anything else is lost in the mists of time):</p>
  
  <pre><code>@FetchProfile(name = "cwithDAndE", fetchOverrides = {
          @FetchProfile.FetchOverride(entity = C.class, association = "dByCId", mode = FetchMode.JOIN),
          @FetchProfile.FetchOverride(entity = D.class, association = "eByDId", mode = FetchMode.JOIN)
  })
  </code></pre>
  
  <p>I enable the FetchProfile for the session and successfully use a session.get with no error and C and D populated - E is still lazy and unpopulated. In desperation I remember trying a dot notation for the association from C downwards. I can only find examples that have a depth of one.</p>
  
  <p>This is an OCD type gap in my knowledge that needs filling!</p>
  
  <p>Thanks in advance for any help.</p>