You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since there is potentially a mismatch with existing duplicate key handling, I've only added this to 5.3.3 for the time being.
There is an easy solution for 5.2.x after all, simply adding the error code to a sql-error-codes.xml file as mentioned above.
If duplicate keys are used in a single upsert (
ON CONFLICT DO UPDATE
) statement, then postgres returns a cardinality violation error.There are some options to translate it:
UncategorizedSQLException
(current)DuplicateKeyException
DataIntegrityViolationException
CardinalityViolationException
somewhere in the inheritance treeI'm currently overriding
sql-error-codes.xml
in order to return aDuplicateKeyException
, as the user cause and exception handling are the same.The text was updated successfully, but these errors were encountered: