i am using sql, H2, and i am trying to make so that the ID of Usertable is auto_incremented. i tried all sql commands in H2 sql interface, didnot work out.
alter table user alter column int not null auto_increment;
this common one is even not working. is there any annotation of JPA for auto_incement may be?
thanks a lot
You should use the JPA annotations @Id
and @GeneratedValue
for your ID.
Your SQL looks valid. Can you post the error message?
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