Reputation: 671
I am using a postgresql database table which may have inserts with the ID set manually by the user, or need an ID generated using hibernate.
This may lead to the occurrence of generating an ID which has already been inserted into the database manually. Is there any way hibernate can check for collisions between the generated ID and existing IDs?
Upvotes: 1
Views: 677
Reputation: 154070
Hibernate cannot check that, because the sequence is allocated by the database. You could either:
Upvotes: 1