I notice that lock don't work with sql server 2000.
Code:
public override bool SupportsForUpdate
{
get { return false; }
}
Sql server 2000 use another way to lock database.
NHibernate base on Hibernate. In java world Maybe no one think sopport
sql server is important thing. But it is nightmare in .Net world.
At first I wannt to use Session.Lock() to lock object. Because I use
Per-Request/Pre-Session. Object will be edited by 2 or more session.
But I find it is no use on SQL server 2000. So I have to use
BeginTransaction(IsolationLevel.RepeatableRead);
A exception will be raised though it can prevent data confusion.
I think I just need block other session read an object for a short time.
How to do?