title: How to Eager Load Associations without duplication in NHibernate?
body: <p>I'd need to load a list of very large objects with so many children and children of children. what's the best approach to take? </p>
  
  <p>I'm using Oracle 11g database and I've written the below method but it results in cartesian product (duplicated results):</p>
  
  <pre><code> public IList&lt;ARNomination&gt; GetByEventId(long eventId)
          {
              var session = this._sessionFactory.Session;
  
              var nominationQuery = session.Query&lt;ARNomination&gt;().Where(n =&gt; n.Event.Id == eventId);
  
              using (var trans = session.Transaction)
              {
                  trans.Begin();
  
                  // this will load the Contacts in one statement
                  nominationQuery
                      .FetchMany(n =&gt; n.Contacts)
                      .ToFuture();
  
                  // this will load the CustomAttributes in one statement
                  nominationQuery
                      .FetchMany(n =&gt; n.CustomAttributes)
                      .ToFuture();
  
                  // this will load the nominations but joins those two tables in one statement which results in cartesian product
                  nominationQuery
                      .FetchMany(n =&gt; n.CustomAttributes)
                      .FetchMany(n =&gt; n.Contacts)
                      .ToFuture();
  
                  trans.Commit();
              }
  
              return nominationQuery.ToList();
          }
  </code></pre>