Organizational Research By

Surprising Reserch Topic

adding an enum as a class property in hbm


adding an enum as a class property in hbm  using -'hibernate,enums,hibernate-mapping,hbm'

I am trying to create a class in HBM file which contains an Enum as a field.

The HBM is similar to this:

<class name="a.b.c.myObject" table="OBJECT" >
       <property name="myEnum" column="EXAMPLE" type="a.b.c.myEnum" />
</class>


and let's say that this is the Enum:

public enum myEnum{
    a, b, c;
}


The problem is that in the DB I expected to see the String value of that enum (a,b or c) but instead I got the raw data of that field.

How can I solve that?  
    
asked Oct 19, 2015 by android_master
0 votes
2 views



Related Hot Questions



Government Jobs Opening


...