Loading

Hibernate注解之@Enumerated:针对枚举enum(转)

https://my.oschina.net/xinxingegeya/blog/359968

 
@Column(name = "store_type", nullable = false)
@Enumerated(EnumType.ORDINAL)
private StoreType storeType;

EnumType.ORDINAL:按0,1,2。。。依次
EnumType.STRING:按枚举值
posted @ 2017-07-11 14:52  yaro-feng  阅读(1364)  评论(0编辑  收藏  举报