Enum in Hibernate, persisting as an enum

后端 未结 5 1887
梦如初夏
梦如初夏 2020-11-29 05:07

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

5条回答
  •  感动是毒
    2020-11-29 05:45

    not sure why it is not in Hibernate documentation but you can do this

    
        
            com.a.b.MyEnum
            12
            
         
    
    

提交回复
热议问题