-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Race conditions, Unique columns and Friendly errors
PostPosted: Sun Mar 06, 2005 5:53 am 
Newbie

Joined: Sun Mar 06, 2005 5:41 am
Posts: 13
Hello,

I am fairly new to hibernate3, 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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.