How to show friendly message when getting unique constraint exception
daphna deutsch
Greenhorn
Joined: Nov 17, 2005
Posts: 17
posted
0
I'm using JPA with hibernate and oracle DB.
I add unique annotation to my entity:
As i understand, this validation will not occure at runtime.
i do have contraint in the DB.
so when trying to save an object, i'm getting the exception
How can i show a "friendly" message to the user instead of the message from the exception?
(like in the case of not-null, where i define the message on the entity).