In my MySQL database, there\'s the column \"gender enum(\'male\',\'female\')\"
I\'ve created my enum \"com.mydomain.myapp.enums.Gender\", and in my Person
My understanding is that MySQL enum type is very proprietary and not well supported by Hibernate, see this comment from Gavin King (this related issue is a bit different but that's not the important part).
So, I actually think that you'll have to use your own UsereType
and I'd recommend to use the Flexible solution - working version from the Java 5 EnumUserType (see Appfuse's Java 5 Enums Persistence with Hibernate for an example).
Personally, I'd just forget the idea to use MySQL enum, I'm not convinced that the "benefits" are worth it (see this answer for more details).