Hi
I've this generated mapping:
Code:
<set name="nreferences" inverse="true">
<key>
<column name="notification_id" not-null="true">
<comment></comment>
</column>
</key>
<one-to-many
class="com.xx.xxx.notifications.bl.beans.Nreference" />
</set>
Is posible to transform it to a map ?
I've tried to do this:
Code:
<class name="com.xx.xxx.Notification" table="notification" catalog="zzzz1">
<comment></comment>
<id name="notificationId" type="long">
<column name="notification_id" />
<generator class="assigned" />
</id>
<map name="nreferences" inverse="true">
<key>
<column name="notification_id" not-null="true">
<comment></comment>
</column>
</key>
<map-key type="String">
<column name="ndescription_locale" />
</map-key>
<one-to-many class="com.xx.xxx.Nreference" />
</map>
</class>
<class name="com.xx.xxx.Ndescription" table="ndescription" catalog="zzzz1">
<comment></comment>
<composite-id name="id" class="com.xx.xxx.NdescriptionId">
<key-property name="ndescriptionLocale" type="string">
<column name="ndescription_locale" length="2" />
</key-property>
<key-many-to-one name="notification" class="com.xx.xxx.Notification">
<column name="notification_id" />
</key-many-to-one>
</composite-id>
<property name="ndescriptionTitle" type="string">
<column name="ndescription_title" not-null="true">
<comment></comment>
</column>
</property>
<property name="ndescriptionDescription" type="string">
<column name="ndescription_description" not-null="true">
<comment></comment>
</column>
</property>
</class>
But I'm a little bit confused with my docs reading so, may be a more experienced java user could give me a clue...
Thanks in advance
C