Hello
I know how to map a java.util.Map with enum as a key using annotations:
Code:
@JoinTable( name="map_table" )
@CollectionOfElements(fetch=FetchType.EAGER)
@Cascade(value = CascadeType.DELETE_ORPHAN)
@Enumerated(value=EnumType.ORDINAL)
@MapKey( columns = { @Column( name="myenum" ) } )
@Column( name="myvalue")
Map<org.example.MyEnum,Integer> someMap;
I also know how to map enum using hbm file, but for single property:
Code:
<property name="myfield" length="30">
<type name="org.hibernate.type.EnumType">
<param name="enumClass">org.example.MyEnum</param>
<param name="type">12</param>
</type>
</property>
The question is: How to map a java.util.Map with enum as a key(index) using hbm.xml file?
Thank you in advance