Hi,
I want to map a collection to hashmap.
<map name="topoLinkTerminations" cascade="all" inverse="true" fetch="join">
<key>
<column name="TOPO_LINK_CODE" precision="38" scale="0"
not-null="true" />
</key>
<composite-map-key class="">
<key-property name="propName" column="PROP_NAME"></key-property>
<key-property name="azType" column="A_Z_TYPE"></key-property>
</composite-map-key>
<one-to-many class="TopoLinkTermination" />
</map>
My questions:
1)
Should create a class, for example, CMapKey as following?
class CMapKey implements java.io.Serializable
{
private String propName;
private String azType;
}
2) Is the mapping above a correct one? If not, what's wrong?
Hope someone could help.
Thanks.
|