-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate exception and ConstraintViolationException
PostPosted: Thu Jul 14, 2005 1:23 pm 
Beginner
Beginner

Joined: Thu Jun 30, 2005 5:07 am
Posts: 33
When I try to delete an object that has a refernce in many to many table I get a HibernateException. How can I be sure that it is ConstraintViolationException ?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 14, 2005 1:37 pm 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
Don't really know what you mean...

ConstraintViolationException extends JDBCException which itself extends HibernateException.

Code:
try {
   [...]
}
catch (ConstraintViolationException e) {
   [...]
}
catch (HibernateException e) {
   [...]
}


Best regards
Sven


Top
 Profile  
 
 Post subject: ConstraintViolationException
PostPosted: Fri Jul 15, 2005 8:21 am 
Beginner
Beginner

Joined: Thu Jun 30, 2005 5:07 am
Posts: 33
Sorry, I forgot to mention that I am using Hibernate 2.x not 3


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 15, 2005 9:10 am 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
Same is true for Hibernate 2.1.x.

ConstraintViolationException extends JDBCException which itself extends HibernateException.


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

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.