Hello,
I am fairly new to hibernate, I have only used it to do simple things so far.
My scenario is this: I will have a table of users, the user.Name property is a unique column. What strategy should i take to ensure that there isnt a violation of the unique constraint and also tell the user that the name was already taken. I can catch DataIntegrityException in spring, but that does not tell me which column(s) was the culprit, neither does hibernate without having to do some regexp trickery with exception.getMessage();
Thanks
|