How does the JPA @SequenceGenerator annotation work
sequenceName is the name of the sequence in the DB. This is how you specify a sequence that already exists in the DB. If you go this route, you have to specify the allocationSize which needs to be the same value that the DB sequence uses as its “auto increment”. Usage: @GeneratedValue(generator=”my_seq”) @SequenceGenerator(name=”my_seq”,sequenceName=”MY_SEQ”, allocationSize=1) If … Read more