Hibernate @Enumerated mapping

后端 未结 4 2158
[愿得一人]
[愿得一人] 2020-12-05 04:39

Hibernate provides @Enumerated annotation which supports two types of Enum mapping either using ORDINAL or STRING. When w

4条回答
  •  囚心锁ツ
    2020-12-05 05:20

    Check these two articles - http://community.jboss.org/wiki/Java5EnumUserType and http://community.jboss.org/wiki/UserTypeforpersistingaTypesafeEnumerationwithaVARCHARcolumn

    They solve the problem by a custom UserType.

提交回复
热议问题