Also, TableHiLoGenerator DOES support a "where" parameter, which I believe
you would configure this way:
<generator class="hilo">
<param name="where">table='this_class_table'</param>
</generator>Diego On Tue, Jan 12, 2010 at 18:09, Oskar Berggren <[email protected]>wrote: > You don't need multiple rows. You can use multiple hilo tables. > > /Oskar > > > 2010/1/12 Graham Bunce <[email protected]>: > > All, > > > > I know this isn't the "correct" way to do this but I need to know how > > to use HiLo and have the hilo table store a row for each entity in my > > system. > > > > My reason for this is that I am migrating an existing DB that uses 32- > > bit integers with Identity over to NHibernate (currently 1.2 but we > > aim to upgrade to 2.1.x as well). > > > > Therefore I cannot use 64-bit numbers, I need to pre-seed the HiLo > > table and (annoyingly) some of the ID's have business meaning > > (apparently they didn't originally, but over time, now they do). I > > have ideas to sort that out but I'm stuck with the HiLo on 32-bit keys > > whch means sooner or later I'm going to hit a maximum value problem. > > We have a high volume database so I'd rather postpone that issue for > > as long as I can, so I don't want to use the same HiLo across all my > > entities unless there is a very good reason why I should.... > > > > I've read this thread > > > > > http://groups.google.com/group/nhusers/browse_thread/thread/7c70df65e24a4034/a7585fd6e55b000f?lnk=gst&q=hilo+where+parameter#a7585fd6e55b000f > > > > but nobody actually answered the question the poster asked, i.e. How > > to you configure the mapping for a HiLo with a WHERE clause? > > > > I've tried google etc. and " NHibernate HiLo "Where parameter" " > > returns 2 pages none of which actually provide a concrete example. > > > > Has anyone ever actually done this? Can you provide a mapping please? > > > > 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]<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.
