• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reset AUTO INCREMENTS

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic