Hello!
Another question about Hilo and Id-generators continuing my
exploration of the hilo id-generator.
If I have a m-m-table with following:
<class name="BlockKurskatalog" table="Block_Kurskatalog" >
<id name="ID" >
<generator class="hilo"/>
</id>
<property name="BlockId" not-null="true" unique-
key="IX_Block_Kurskatalog"/>
<property name="KurskatalogId" not-null="true" unique-
key="IX_Block_Kurskatalog"/>
<many-to-one name="Block" />
<many-to-one name="Kurskatalog"/>
</class>
and mapping making use of m-m-table
<class name="Kurskatalog" table="Kurskatalog" dynamic-insert="true"
dynamic-update="true" >
<id name="ID" column="Id">
<generator class="hilo"/>
</id>
<idbag name="Blocks" table="Block_Kurskatalog" cascade="all">
<collection-id column="collection_index" type="Int32">
<generator class="hilo"/>
</collection-id>
<key column="Kurskatalog_id" />
<many-to-many class="Block" column="Block_id" />
</idbag>
</class>
Then I have the flexibility to work against the object mapped to m-m-
table directly and through the object with mapping making us of m-m-
table. The second option is the preferred.
Would those two id-generators cause each other any problems?