The most recent mapping of an enumeration type with Hibernate is that in the MySQL database, if you do not configure the type of the enumerated types property in the Hibernate map file, hibernate maps the enum type to the Tinyblob type by default. This is very embarrassing, it seems to spend a lot of resources, to search the Internet, there are a number of solutions if the use of annotation then @enumerated (enumtype.string) can be mapped directly to the STRING type If you use XML configuration is not so simple, the most online method is to use the hibernate provided usertype but this is not the best solution, there is a better way
Package com.igalia.enumerates; public enum Status {BUSY, AVAILABLE;} package com.igalia.entities; Class MyClass {private status status;//getter and Setter}
<class name= "MyClass" > <id name= "id" > <generator class= "native"/> </id> <property name= " Status "> <type name=" Org.hibernate.type.EnumType "> <param name=" Enumclass "> Com.igalia.enumerates.Status </param> </type> </property> </class>