Hi All,

I'm switching a simple data layer to use HILO generator (on SQL Server). 
 However this app has been running for a while and has been using identity 
generation.  So my question is, how do I do this safely?  I had planned to 
do something like:
- Remove all IDENTITY properties on each table manually
- Create the HILO table with the default SchemaExport like sql script, i.e:

  create table HiLoIDValues (next_hi BIGINT)
  insert into HiLoIDValues values ( 1 )

However, how can I guarantee that I do not reuse IDs that have already been 
used in the last few years?, i.e.  Should I change the insert line to?

insert into HiLoIDValues values ( (SELECT MAX ID FROM ALL TABLES) )

Is this necessary or does NH already do a 'SELECT MAX (IDCOLUMN)' for each 
table on start up?

Thanks in advanced.

Guido

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