<p>The default behavior of NHibernate is the write all changes to objects to the database when Session.Flush() is called. It does this whether you want it to or not.</p>

<p>How do we prevent writing bad data to the database when we need to do things like validate business rules or input?</p>

<p>For instance .. </p>

<ul>
<li>Customer Name is not null. </li>
<li>User opens a web browser (without javascript) and deletes the customer name. </li>
<li>Hits update. </li>
<li><code>Customer.Name</code> property is updated and .. </li>
<li><code>Customer.IsValid()</code> is called. </li>
<li>Even if <code>IsValid()</code> is false and we show error messages NHibernate still updates the database.</li>
</ul>

Use the ISession.Evict(objectToEvict) method to evict invalid objects.
See:
http://www.tobinharris.com/2007/2/3/nhibernate-faq
and
http://www.surcombe.com/nhibernate-1.2/api/html/M_NHibernate_ISession_Evict.htm