Quote:
java.sql.BatchUpdateException: Duplicate entry '105-213' for key 1
This exception actually comes from your database,
so you must enable 'ignore duplicate' directly on index on the database (if your database offers this feature at all).
Quote:
As well, what could be a reason to hibernate to insert when i do find?
Most probably you are calling a query without changing the default flush mode,
which means that implicitly flush() is called (performing all scheduled insert, update and delete actions).
Quote:
When the database doesn't have a duplicate record!
It's obvious that on the database you never will see duplicate records, because the unique-constraint don't permits it.
But you are trying to insert a record which has the same unique-constraint key as another already inserted record.