java - Hibernate JPA check for a conflict when generating IDs -


i using postgresql database table may have inserts id set manually user, or need id generated using hibernate.

this may lead occurrence of generating id has been inserted database manually. there way hibernate can check collisions between generated id , existing ids?

hibernate cannot check that, because sequence allocated database. either:

  1. assign negative numbers manually inserted ids
  2. use uuid instead of sequences

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -