Highly dependent on your scenario/requirements as well as database. "Native"
means the preferred generation strategy for your database, which for SQL
Server is identity, Oracle is sequence, etc. Many people - myself included -
prefer guid.comb as a generation strategy because PKs can be created by
NHibernate without having to touch the database. Guids are good for
replication, disconnected applications, etc. Guid.comb avoids the primary
problem of guids, which is poor insert performance due to data page
splitting. Guid.comb produces monotonically increasing guids, which yield
insert performance indistinguishable from 32-bit integer PKs.
HTH,
James
--
James Kovacs, B.Sc., M.Sc., MCSD, MCT
Microsoft MVP - C# Architecture
http://www.jameskovacs.com
[EMAIL PROTECTED]
403-397-3177 (mobile)


On Tue, Sep 30, 2008 at 11:00 AM, Pedro Santos <[EMAIL PROTECTED]>wrote:

>
> Hello,
>
> I currently use generator=native, but I've bee reading on the
> documentation and on this list that there are better options.
>
> I have googled to search for pros/cons on the generators, but I
> haven't find anything. So, what's your suggestion? Could you advise on
> the best generator? And maybe give some insights on why it's the best?
>
> Thank you!
>
> --
> Pedro Santos
> Home - http://psantos.zi-yu.com
> Work - http://www.pdmfc.com
> The future - http://www.orionsbelt.eu
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to