我的实体定义像休眠 - 如何使用枚举作为地图的关键
Map<String, String> props;
我有了这个休眠xml配置
<map name="props" table="PROPS">
<key column="id"/>
<index column="name" type="string"/>
<element column="value" type="string"/>
</map>
现在,我想我的地图是一个EnumMap的一个领域像
Map<MyEnum, String> props;
我想我需要创建我自己的Hibernate的用户类型为MyEnum,然后引用这个从hbm.xml ...
你有什么知道什么是最好/最简单的方法来实现这一点?
非常感谢