Instead a highlow-table-per-hierarchy you can have
a highlow-record-per-hierarchy.
ConfORM UsageExample to do it:
http://code.google.com/p/codeconform/source/browse/ConfOrm/ConfOrm.UsageExamples/HighLowPerEntity/Demo.cs

On Thu, May 5, 2011 at 9:13 AM, Jason Meckley <[email protected]>wrote:

> I like to have a hilo table per entity instead of a hilo table per databse,
> this way I can maximize my ids for each entity utilizing hilo. with this
> setup you can use the statement:
>               insert into hilo table (next_hi) select max(id) from other
> table
> to populate the hilo for each entity you are migrating. You do loose a
> small range of IDs, but I find that's OK for most of my databases.
>
>
> >>Is this necessary or does NH already do a 'SELECT MAX (IDCOLUMN)' for
> each table on start up?
> NH tracks the hilo ids from the hilo table(s), not the table mapped to the
> entity.
>
> and just as an FYI: each time the session factory is built the hilo seed
> will be set to the next hi value. this means there will be gaps in your IDs.
> for some this is a problem, for others it's not.
>
>
>  --
> 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.
>



-- 
Fabio Maulo

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