Hello,
I wonder is there a clean (or native) way to generate sequence for a table, to use it as a serial number. It needs to be consecutive (1, 2, 3 ...etc), and avoid any possible race/transaction issues(if multiple user try to persist same time). It doesn't require to be the primary key.
@Id
private Long id;
private Long serialNumber;
thanks.