我想要一个包含两列的特定表,一个 ID 和一个我将在其中存储 JSON 对象的字段。我正在使用 Spring Data JPA。
我正在考虑这一行,但我不确定:
@Entity
@Table(name = "some_table")
public class SomeTable {
@Id
@Column(name = "id", unique = true)
@GenericGenerator(name = "uuid", strategy = "uuid2")
@GeneratedValue(generator = "uuid")
private UUID id;
// getters and setters for id here..
// here to be the field for storing JSON objects and it's getters and setters
}