Hibernate Enum mapping using annotaions

后端 未结 2 2051
长情又很酷
长情又很酷 2021-01-18 16:20

I have an existing database that I am now connecting to using hibernate. I cannot change the data in it at the moment and have everything working apart from a single column

2条回答
  •  梦谈多话
    2021-01-18 16:41

    If your Database values are "new", "mailed", "in" and "out" then your Enum need exactly the same names. - I believe that the problem is, that your Enums are in capital letters but your data base values not.

提交回复
热议问题