title: Using a Guid Version column in NHibernate
body: <p>We are working with a legacy database that uses SQL server uniqueidentifier columns for concurrency hence we need to use a Guid as a version column. Any idea how we could achieve this in NHibernate?</p>
  
  <p>We're currently defining our mapping using Fluent NHibernate as a Guid typed property called ConcurrencyId using this snippet</p>
  
  <p><code>Version(x =&gt; x.ConcurrencyId)</code> </p>
  
  <p>This results in the following error when creating a session </p>
  
  <p><code>System.InvalidCastException : Unable to cast object of type 'NHibernate.Type.GuidType' to type 'NHibernate.Type.IVersionType'.</code></p>
  
  <p>Any ideas on how this could be done, fluently or otherwise would be appreciated. We're happy to hack the source if it can be made to work. </p>