title: Concurrent incrementation of integer column on update with NHibernate
body: <p>I have a Posts table with a <code>Version</code> number column to keep track of the nth revision for each record. Every time a row is updated, I would like its <code>Version</code> number to be incremented.</p>
  
  <p>Presently, I am incrementing the column in my application logic, but because <code>post.Version += 1;</code> does not equate to <code>UPDATE Posts SET Version = Version + 1...</code>, I am worried that two concurrent updates will result in only one Version increment.</p>
  
  <p>Solving this is easy with a manual SQL expression (as above) or an update trigger, but I would rather have Fluent NHibernate take care of this for me, if possible.</p>
  
  <p>Using a transaction for the update would not prevent two simultaneous reads from both seeing version "7", and both deciding that the next value should be 8. Thus, two updates to version 7 could result in a value of 8, instead of 9.</p>
  
  <p>How do I design or map an auto-incrementing integer column that is concurrency-safe?</p>