title: NHibernate stored procedure returns data from previous query
body: <p>I use two stored procedures that return the data with the same structure (list of records of the same type).</p>
  
  <p>I call my method Execute(ISession session) twice. First time for the first stored procedure (it returns correct list of 6 rows). Second time - for the second stored procedure (it returns list of 11 rows, but first 6 rows are from the first request that overwrite the correct rows). </p>
  
  <p>I found
  <a href="https://stackoverflow.com/questions/1627707/impact-on-nhibernate-caching-for-searches-with-results-including-calculated-valu">Impact on NHibernate caching for searches with results including calculated value mapped as a formula (e.g. rank)</a></p>
  
  <p>But I can't use it for IQuery</p>
  
  <p>Any ideas or links how it can be fixed ?</p>
  
  <pre><code>public dynamic Execute(ISession session)
  {
      var query = session.GetNamedQuery(QueryName)
          .SetCacheable(false)
          .SetCacheMode(CacheMode.Ignore)
          .SetReadOnly(true);
      var results = query.List&lt;T&gt;();
      return results;
  }
  </code></pre>