title: Eagerly load recursive relation
body: <p>I have a recursive one-to-many relationship that has the default lazy value of true. What code can I write against the NH API that will efficiently retrieve the ENTIRE tree AS IF I had lazy="false" on the SubCategories mapping?</p>
  
  <p>Here's the recursive one-to-many relationship:</p>
  
  <pre><code>&lt;class name="Category" lazy="false"&gt;
      ...
      &lt;list name="SubCategories" fetch="subselect"&gt;
              &lt;key column="ParentCategoryID"/&gt;
              &lt;index column="PositionInList"/&gt;
              &lt;one-to-many class="Category"/&gt;
      &lt;/list&gt;
  </code></pre>
  
  <p>I don't specify lazy="false" on the list since laziness is required in about half the queries I need to run.  I have fetch="subselect" on the list as an optimization for when I do manage to retrieve the entire tree.</p>
  
  <p>I've tried the ICriteria API:</p>
  
  <pre><code>session.CreateCriteria&lt;Category&gt;().SetFetchMode( "SubCategories", FetchMode.Eager ).Add( Restrictions.IsNull("ParentCategory") ).SetResultTransformer( CriteriaSpecification.DistinctRootEntity ).List&lt;Category&gt;();
  </code></pre>
  
  <p>but that only eagerly loaded only the first level in the hierarchy.</p>