Hello,
I have the following mapping:
Code:
<class name="Template" table="Template">
<id name="id" column="idTemplate">
<generator class="increment"/>
</id>
<map name="SingleContainers" table="Template_SingleContainer">
<index column="name" type="string"/>
<key column="idTemplate"/>
<many-to-many class="SingleContainer"
column="idSingleContainer"/>
</map>
</class>
I want to use the name value from SingleContainer as key for the map. How to do that? Should I better user <index-many-to-many/>? But how?
Please help me.
Thank you.
Regards
Stephan