auto increment « Key « JPA Q&A

1. Auto increment key in Hibernate

Hi, I am facing a peculiar problem with Hibernate. I have an application which uses Hibernate and inserts data into database. While inserting a row which is having an auto increment column as primary key into database Hibernate is giving me duplicate integrity constraint exception. Outside the application I may simultaneously insert data into the same table. My doubt is : ...

2. how to get the auto increment key value