I have a simple NHiberntate linq query:
var queryable = session.Linq<Product>().Where(p => p.Active);
Product[] products = queryable.ToArray();
The moment the ToArray()
is executed the session becomes dirty (session.IsDirty()
returns true
). If the transaction is commited there is an UPDATE SQL query generated for each product.
Why are the products marked as dirty after a simple SQL SELECT?
In this project we are using the folowing framework/tools:
- .Net 3.5 + WPF
- NHibernate 2.1.2 + FluentNHibernate
- SQlite
- PostSharp 1.5