aspose file tools*
The moose likes Object Relational Mapping and the fly likes Reset AUTO INCREMENTS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Reset AUTO INCREMENTS" Watch "Reset AUTO INCREMENTS" New topic
Author

Reset AUTO INCREMENTS

masse Satriana
Greenhorn

Joined: Sep 21, 2008
Posts: 8
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


A warm family is worthy enough than hard working.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reset AUTO INCREMENTS
 
Similar Threads
Know auto incremented pimary key
Primiary Key Field
Insert new records in database without deleting existing records
JPA - child insertion while parent updation is possible?
how to use JPA to save a list of objects