Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
public class TableHiLoGenerator : TableGenerator |
Visual Basic |
---|
Public Class TableHiLoGenerator _ Inherits TableGenerator |
Visual C++ |
---|
public ref class TableHiLoGenerator : public TableGenerator |
Remarks
This id generation strategy is specified in the mapping file as
<generator class="hilo">
<param name="table">table</param>
<param name="column">id_column</param>
<param name="max_lo">max_lo_value</param>
<param name="schema">db_schema</param>
</generator>
The table and column parameters are required, the max_lo and schema are optional.
The hi value MUST be fecthed in a seperate transaction to the ISession transaction so the generator must be able to obtain a new connection and commit it. Hence this implementation may not be used when the user is supplying connections. In that case a SequenceHiLoGenerator would be a better choice (where supported).
Inheritance Hierarchy
NHibernate.Engine..::..TransactionHelper
NHibernate.Id..::..TableGenerator
NHibernate.Id..::..TableHiLoGenerator