What are all the parameters of the NHibernate HiLo generator?

I saw some Fabio Molo docs that show the following options:

<id name="Id" type="Int64" column="cat_id"> <generator class="hilo"> <param name="table">hi_value</param> <param name="column">next_value</param> <param name="max_lo">100</param> </generator> </id> 

However, to this question, the poster uses <param name="schema">... , I would like to indicate the circuit for the HiLo generator.

Is there any final documentation for all generator parameters? I tried to use it without success.

+7
nhibernate hilo
source share
2 answers

Another parameter to add to the mix is

 <param name="where">TableName='CmsLogin'</param> 

This gives you the ability to have different counters for each entity, rather than a counter for all objects.

However, I did not see a way to specify the scheme as a parameter, so I think you need to create a separate HiLo Key table for each unique scheme in the database.

+2
source share

According to the source, the full list is: “table”, “column”, “max_lo”, “schema”, “directory” and “where”, but I do not know if they are all used. They are defined in the classes NHibernate.Id.TableGenerator and NHibernate.Id.TableHiLoGenerator.

+1
source share

All Articles