我有一个身份证:
@Column(name = "device")
@GeneratedValue(strategy = GenerationType.AUTO, generator = "device_gen")
@SequenceGenerator(name = "device_gen", sequenceName = "device_id")
@Id
public Integer id;
SequenceGenerator 将 sequenceName 定义为device_id
但尝试保存实体时出现错误:relation "public.device_seq" does not exist。
为什么要寻找device_seq
而不是device_id
?
我正在使用 PostgreSQL