I have an id:
@Column(name = "device")
@GeneratedValue(strategy = GenerationType.AUTO, generator = "device_gen")
@SequenceGenerator(name = "device_gen", sequenceName = "device_id")
@Id
public Integer id;
SequenceGenerator defines the sequenceName as device_id
but trying to save an entity I get the error: relation "public.device_seq" does not exist.
Why is it looking for device_seq
instead of device_id
?
I'm using PostgreSQL
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="device_gen")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With