In this respect it is very similar to the legacy MultipleHiLoPerTableGenerator (not available in NHibernate) in terms of the underlying storage structure (namely a single table capable of holding multiple generator values). The differentiator is, as with SequenceStyleGenerator as well, the externalized notion of an optimizer.
NOTE that by default we use a single row for all generators (based on DefaultSegmentValue). The configuration parameter ConfigPreferSegmentPerEntity can be used to change that to instead default to using a row for each entity name.
Configuration parameters:NAME | DEFAULT | DESCRIPTION |
TableParam | DefaultTable | The name of the table to use to store/retrieve values |
ValueColumnParam | DefaultValueColumn | The name of column which holds the sequence value for the given segment |
SegmentColumnParam | DefaultSegmentColumn | The name of the column which holds the segment key |
SegmentValueParam | DefaultSegmentValue | The value indicating which segment is used by this generator; refers to values in the SegmentColumnParam column |
SegmentLengthParam | DefaultSegmentLength | The data length of the SegmentColumnParam column; used for schema creation |
InitialParam | DefaltInitialValue | The initial value to be stored for the given segment |
IncrementParam | DefaultIncrementSize | The increment size for the underlying segment; see the discussion on Optimizer for more details. |
OptimizerParam | depends on defined increment size | Allows explicit definition of which optimization strategy to use |