Good, I have never use hilo before, gonna visit your links

thanx
----- Original Message ----- 
From: "Raul Carlomagno" <[email protected]>
To: "nhusers" <[email protected]>
Sent: Monday, July 13, 2009 10:11 PM
Subject: [nhusers] Re: Are Identity Columns a Bad Practice?



the bad thing about identities fields is that when you do  a
ISession.Save() NH needs to go to the database and pick up the new id,
so you have N rountrips to the DB being N your saved entities

in my humble opinion, there are 2 best practices, use hilo algorithm
or guid.comb, hilo is user friendly

best explained here

http://nhforge.org/blogs/nhibernate/archive/2009/03/20/nhibernate-poid-generators-revealed.aspx

http://nhforge.org/blogs/nhibernate/archive/2009/05/21/using-the-guid-comb-identifier-strategy.aspx

On Jul 13, 8:17 pm, spiralni <[email protected]> wrote:
> Hello,
>
> I have a question about wich is the best approach when creating my
> tables for using NHibernate.
>
> What I do almost always is to create an autoincrement column as my
> table id. But I have read a lot of thread that talks about this
> identity strategy (POID) and now I feel I am doing something wrong.
>
> For instance, I wanted to insert some various registers (bulk
> insertion) and couldn't use batch beacause it doesn't allowed it...
>
> I will appreciate a lot if you clarify this point.
>
> Thanks



--~--~---------~--~----~------------~-------~--~----~
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