There is another option
http://fabiomaulo.blogspot.com/2009/02/nh210-new-generators.html

<http://fabiomaulo.blogspot.com/2009/02/nh210-new-generators.html>see
: guid.native

2010/2/18 Robert Rudduck <rob...@rpowered.net>

> GUIDs themselves have a fairly low chance of reptition although it does
> happen. Unfortunately the Guid.Comb algorithm breaks down quickly when is
> distributed situations such as the one you are describing (read the comments
> from here:
> http://www.lostechies.com/blogs/derickbailey/archive/2009/07/14/database-id-int-vs-bigint-vs-guid.aspx
> )
>
> If you really, really need sequential Ids (which TBH likely you don't) then
> you are best off by letting the DB do it. My option in this case would be to
> use HiLo however. That lets the DB be the point of truth (which is what you
> want) but saves the overhead of Identity (etc) type identifiers. You Ids
> wont be completely sequential however.
>
> There is some good tech out on the net about NH identifiers and the
> drawbacks of each.
>
> On Wed, Feb 17, 2010 at 10:55 PM, Chris J <chrisj...@gmail.com> wrote:
>
>>
>> I am evaluating using NHibernate as the ORM for our platform. In our
>> environment, there are multiple servers performing operations on the
>> database. I'd like to be able to use sequential IDs when adding new
>> records to certain tables. I have read about and experimented with the
>> 'guid.comb' ID generator.
>>
>> If I were to use guid.comb for ID generation on multiple servers, how
>> would that affect table fragmentation on database (SQL Server)? Is
>> there any risk of ID collision when more than one server is adding
>> records with guid.comb as the ID generator?
>>
>> Thanks.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to nhus...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to nhus...@googlegroups.com.
> To unsubscribe from this group, send email to
> nhusers+unsubscr...@googlegroups.com<nhusers%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhus...@googlegroups.com.
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to