-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: GUID as <version> ?
PostPosted: Mon Jun 25, 2007 12:59 am 
Newbie

Joined: Fri Jan 12, 2007 2:28 pm
Posts: 10
Location: Houston, TX
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


Top
 Profile  
 
 Post subject: Re: GUID as <version> ?
PostPosted: Mon Jun 25, 2007 9:55 am 
Regular
Regular

Joined: Mon Aug 29, 2005 3:07 pm
Posts: 77
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.