-->
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: Naming constraints
PostPosted: Tue May 27, 2008 10:23 am 
Newbie

Joined: Tue May 27, 2008 10:11 am
Posts: 7
Hello,

In Hibernate documentation I found that: "Currently, the specified value of the unique-key attribute is not used to name the constraint in the generated DDL". But is it possible to name unique constraint?

I like to catch ConstraintViolationException and from it get to know which constraint was violated - is it userId, is it userAlternateLogin or something else. It would be great to now it from exception. As a workaround I catch this exception and then I check if there is userId already used or maybe userAlternateLogin is already used or... But it is inconvenient.

Thanks for any help with this issue.

P.S. I've searched documentation, googled many pages and I did not find the answer.


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.