Reputation: 657
I have two different classes that map to two different database tables. IDs are created by NHibernate using the HiLo generator:
<generator class="hilo">
<param name="table">uid</param>
<param name="column">column</param>
</generator>
Are the IDs unique across both tables if I use the same table
and column
parameters for both mappings? If not, how can I achieve this?
Upvotes: 1
Views: 55
Reputation: 123861
NHibernate will distribute unique ids among all these tables, which use the same setting (table and column)
If we want to have different id rows/sets, we can use another param:
<param name="where">TableName='CmsLogin'</param>
see more here:
Upvotes: 1