我继承了我试图通过 JPA 映射的 SQL Server 数据库。许多表都有一uniqueidentifier
列。我正在尝试像这样映射它们:
@Id
@GenericGenerator(name = "generator", strategy = "guid", parameters = {})
@GeneratedValue(generator = "generator")
@Column(name = "APPLICATION_ID")
private String id;
休眠抱怨:
Found: uniqueidentifier, expected: varchar(255)