title: Why evicting objects from Session does not commit changes to database?
body: <p>I am using NHibernate in my application and have the following situation. (Note that the situation here is much more simplified for the sake of understanding)</p>
  
  <p>An object is queried from the database. It is edited and updated using <code>Session.Update()</code>. The object is then Evicted from the Session (using <code>Session.Evict(obj)</code>) before the transaction is committed. Expected result is that the changes are persisted to the database.</p>
  
  <p>This used to work fine when I had my <code>Id</code> column as a NHibernate <code>identity</code> column.
  Recently, we changed the Id column to be non-identity. As a result, the above scenario does not persist to the database unless I explicitly call <code>Session.Flush()</code> before I Evict.</p>
  
  <p>Can someone point/explain to me the reason for this behavior? </p>
  
  <p>This link, <a href="https://stackoverflow.com/questions/2853117/nhibernate-session-flush-evict-vs-clear">NHibernate Session.Flush &amp; Evict vs Clear</a>, mentions something about Evict and the identity column, which to me is not very clear.</p>