Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reset AUTO INCREMENTS

 
masse Satriana
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Does JPA has feature in GeneratedType identity to reset auto-increment ?
For example I have one entity called customers. It contains 10 record.
then I delete record 9th and 10th.
When I insert new Record on customer table, the record should start on record 9 not 11.
In sql query we always using " alter table customer AUTO_INCREMENT=1; "
Any clues in JPA?so it will done automatically everytime I delete and insert operation.

Regards,
Masse Satriana
 
You have to be odd to be #1 - Seuss. An odd little ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!