Yes, Lester is correct. You need pesimistic locking.
(Of course, as with all concurrency issues, its best if you can design your application so that multiple users cannot update the exact same thing at the exact same time. A sound design principle is to avoid threading/concurrency issues wherever you can do so.)
I've actually been researching this for another situation. Check out the manual -- Chapter 14: Transactions and Concurrency
http://nhibernate.sourceforge.net/h2.0.3docs/reference/html/transactions.html
The SQL equivalent is select .... for update. You may want to consider the nowait option if your database supports it. Probably the easiest way to set it would be with a method call to the Query -- setLockMode(). You'd want the UPGRADE or UPGRADE_NOWAIT setting.
Though, I do note that the manual says,
Quote:
If the database does not support the requested lock mode, Hibernate will use an appropriate alternate mode (instead of throwing an exception). This ensures that applications will be portable.
Makes me wonder what it is that Hibernate does in that case -- wait until its available, I guess. Anyone know for sure?