DuplicateKeyException alternative for javax.persistence
-
05-10-2019 - |
Pergunta
Is there something like of DuplicateKeyException applicable to javax.persistence.*?
I've found this exception for ejb lib only: DuplicateKeyException
Thank you.
Solução
javax.persistence.EntityExistsException is what you will usually get from a JPA provider if you try to save something that as a duplicate key.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow