title: Need help to access few values when fetch type is eager for all sub entities
body: <p>Assume </p>
  
  <ol>
  <li><p>I have a parent entity "A" and child entities "B", "C", "D" and "E"</p></li>
  <li><p>One to Many mapping is defined with fetch type as eager for all the child entities of A which is - "B", "C", "D" and "E"</p></li>
  <li><p>B, C, D, E are tied with Many to One - "P" entity</p></li>
  </ol>
  
  <p>Now when i get the "A" entity...all is being loaded and the below query takes a huge time</p>
  
  <pre><code>FROM A ORDER BY pkey DESC 
  </code></pre>
  
  <p>After retrieving the "A" entity..I will iterate the B and get the "P" primary key from the same. similarly i need all the primary keys of "P" associated with "B", "C", "D" and "E"</p>
  
  <ol>
  <li><p>Is it possible to write any HQL to get only the primary keys without loading the entire entities without considering or bypassing the annotations which is already defined with fetch type as eager? </p></li>
  <li><p>Can we change the fetch type as eager to lazy, execute separate queries for each entity to get the values?</p></li>
  <li><p>Does adding a batch size to fetch type as eager would be fruitful?</p></li>
  </ol>
  
  <p>Could you please suggest how we can approach on the three and what would be the best approach to resolve this issue?</p>
  
  <p>Thanks.</p>