DuplicateKeyException alternative for javax.persistence
-
05-10-2019 - |
Question
Is there something like of DuplicateKeyException applicable to javax.persistence.*?
I've found this exception for ejb lib only: DuplicateKeyException
Thank you.
Solution
javax.persistence.EntityExistsException is what you will usually get from a JPA provider if you try to save something that as a duplicate key.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow