title: How does this NHibernate code influence the commit?
body: <p>I ran into an issue where the following code results in an exception.</p>
  
  <pre><code>public IList&lt;Persoon&gt; GetPersonenWithCurrentWorkScheme(int clientId)
      {
          //SELECT N+1
          Session.QueryOver&lt;Werkschema&gt;()
              .Fetch(ws =&gt; ws.Labels).Eager
              .JoinQueryOver&lt;WerkschemaHistory&gt;(p =&gt; p.Histories)
              .JoinQueryOver&lt;ArbeidsContract&gt;(a =&gt; a.ArbeidsContract)
              .JoinQueryOver&lt;Persoon&gt;(p =&gt; p.Persoon)
              .Where(p =&gt; p.Klant.ID == clientId)
              .Future();
  
          var result = Session.QueryOver&lt;Persoon&gt;()
              .Fetch(p =&gt; p.ArbeidsContracten).Eager
              .Where(p =&gt; p.Klant.ID == clientId)
              .Future();
  
          return result.ToList();
      }
  </code></pre>
  
  <p>When I comment the first part of the method (<code>Session.QueryOver WerkSchema...</code>) the code runs fine. When it is not commented, the first <code>NHibernate.Commit()</code> that occurs throws an exception. (Something with a date-time conversion but that's not really what I'm worried about).</p>
  
  <p>My question: Is the first bit of code useful? Does it do anything? The result is not stored in a variable which is used later, so to me it looks like dead code. Or is this some NHibernate dark magic which actually does something useful?</p>