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:按枚举值
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:按枚举值