Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个实体
@Entity @Table(name = "Person") public class Person { @Embedded private Item; }
我想将包含枚举的嵌入对象添加到我的实体中
public class Item{ public ItemEnum items; }
如何添加Item为嵌入对象,Person并且我想将值保存items为column in Person.
Item
Person
items
column in Person
我想你想要这样的东西......
@Enumerated(EnumType.STRING) @Column(name = "ITEM") private Item item;