Hi guys. I've got a very simple mapping question. I've got a many-to-many mapping in which children can belong to multiple parents. I'd like the parents to have a Map of children, indexed by name, instead of a simple set. My current mapping is:
Code:
<set name="fields" table="SECTION_FIELDS_TABLE" lazy="true">
<key column="section_id"/>
<many-to-many class="com.rhoworld.edc.model.Field" column="field_id"/>
</set>
How can I turn this into a map whose key values are the fields' name properties? I'm using hibernate-2.1. Thanks for any tips.