Hibernate version2.1.6:
For constraints reasons, we often store type safe enum values in a separate table A_enum for example.
In Java, I have create a type safe enum class, along with its associated Hibernate user type.
In MyEnum.hbm.xml I've set the following:
<id name="value" type="myEnumUserType">
<generator class="assigned"/>
</id>
However, when Hibernate loads the data in, it seems to be trying to set the 'value" property directly and not use the user type class to do it.
Is this a limitation of <id> and user types, or is there a better way to do this?
Nick
|