You could also learn the algorithm for hilo and make the inserts using the same logic. In any case i'm not sure it is a good idea to use hilo if you permit manual inserts.
On Wed, Oct 13, 2010 at 3:43 PM, Gustavo Ringel <[email protected]>wrote: > Excuse me didn't put attention on the Manual Insertion, in this case i will > go for GUID's. > or will start the next_hi in a relatively big number and use the first x > million numbers for manual use. > > Gustavo. > > > On Wed, Oct 13, 2010 at 3:36 PM, Luka <[email protected]> wrote: > >> Ok, great. >> Now what about the second problem. >> Let say i have max hi of 100. >> With nhibernate I insert 5 rows, and it inserts rows with id 1...5. >> Now I go to sql manager and manually insert additional 7 rows with >> id's: 6,7,8,9,10,11,12. >> >> Now if I try with nhibernate to insert some more rows, will it try to >> insert rows beginning with id of 6 or with id of 13? >> >> On Oct 13, 2:58 pm, Gustavo Ringel <[email protected]> wrote: >> > signed long maximum is 9,223,372,036,854,775,807, a little more than >> > 17,000,000,000 >> > >> > Gustavo. >> > >> > >> > >> > >> > >> > >> > >> > On Wed, Oct 13, 2010 at 2:46 PM, Luka <[email protected]> wrote: >> > > Hi, I have to create tables in database (sql server 2008) that can >> > > have very large number of rows (about >> > > 17 000 000 000 records in one table). >> > > What is the best option for Id generator in my case? >> > > I think of HiLo, but don't know if it supports numbers that large (Int >> > > 64). >> > >> > > The other problem I have is that I will sometimes need to manually >> > > insert records in the db (bulk insert in MS Sql manager with INSERT >> > > INTO... SELECT ... FROM..) and how will nhibernate handle that >> > > scenario? >> > > I mean ie. If i manually insert 5 rows in the table, and then try to >> > > insert some more record with nhibernate, what if nhibernate try to >> > > insert record with ID already in the table. >> > >> > > Please help >> > >> > > -- >> > > 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]<nhusers%[email protected]> >> <nhusers%[email protected]<nhusers%[email protected]> >> > >> > > . >> > > 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<nhusers%[email protected]> >> . >> 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 [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.
