Hi
Is it possible to fetch read-only "snapshot" of objects with ICriteria or IQuery? (with lazy loading enabled as usual).
E.g. when I am fetching array of 2000 objects, just for displaying them, NHibernate sometimes transparently update all of them with 2000 UPDATE queries, hanging my app for long time (15 sec on my machine).
To avoid the problem I have a loop:
Code:
For Each dok As Document In list_full
ses.Evict(dok)
Next
But it has two disadvantages:
1) it's an ugly piece of code
2) I cannot use lazy loading after "evicting" an object
Any suggestions?