First, let me say I do not know the extent to which 2012 sequences are supported in NHibernate.
It seems to me like sequences have all the benefits of hilo without the extra table. You can reserve ranges of the sequence, just like hilo, so you don't suffer from the issues with IDENTITY (having to SELECT after every INSERT), and it is easier to use in straight SQL inserts than hilo. Also, DBAs understand them and can use them seamlessly, whereas they generally hate learning how to work with the hilo table(s). They are not as portable as hilo, though, as not all databases support sequences. -Tyler From: [email protected] [mailto:[email protected]] On Behalf Of Craig van Nieuwkerk Sent: Thursday, June 20, 2013 7:15 AM To: [email protected] Subject: Re: [nhusers] SQL2012 sequences, how and why? I think one of the main advantages is you can do inserts in stored procs in the database and it is much easier to manage the Id. On Thu, Jun 13, 2013 at 4:16 PM, Rippo <[email protected]<mailto:[email protected]>> wrote: Looking through the nh-core source I can see that the MsSQL2012 now supports Sequences. Does anyone have a blog post or an example in code how to set this up? We are just about to upgrade some systems from 2008 to 2012 and I am wondering what advantages sequences have over HILO, can any one help? Thanks Rippo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:nhusers%[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at http://groups.google.com/group/nhusers?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/groups/opt_out.
