drmcclelland wrote:
Hello,
Our SQL Server 2000 database table has a column of type uniqueidentifier (GUID) which the application used for optimistic concurrency version checking. If I switch to NHibernate, can I use this column still for this purpose? According to the NHibernate 1.2 docs "Version numbers may be of type Int64, Int32, Int16, Ticks, Timestamp, or TimeSpan", so do I need to drop the GUID column in favor of one of these datatypes?
And if I do switch - are there pros/cons to choosing Timestamp vs. Int32 ???
Thanks,
David McClelland
I've been looking after this this weekend as well, and you cannot use a guid as the version-column in NHibernate, since the GuidType in the NHibernate project doesn't implement the IVersionType interface.
I think that this is done because it is not possible to generate 'sequential' Guid's, but I'm not sure.