tags:

views:

44

answers:

1

In other words, what are the main reasons to use it?

Thanks

+4  A: 

Versioning is commonly used to implement a form of concurrency. In tables that can be accessed from different sources at the same time, a column named version is used. Nhibernate notes down the version of an object when it reads it, and when it tries to update it, it first checks that the version hasn't changed. On updating a row, the version column is incremented.

kgiannakakis
As a side note, you should use this with a number (ie, int), as opposed to a timestamp. Even tho a timestamp sounds logical since the issue is rooted in timing, an int removes the possibility of a load and update occurring within a millisecond, however unlikely that may be. Cheers
Berryl