-->
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.  [ 2 posts ] 
Author Message
 Post subject: mapping Hibernate Exceptions to owm Application Exception
PostPosted: Tue Sep 14, 2004 2:32 am 
Newbie

Joined: Tue Sep 14, 2004 2:25 am
Posts: 1
Hibernate version:2.1.6

example:
if hiberate can't delete a row it throws the following exception:
net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)

is there a possiblity to identify such a exception without parsing the exception message?

//peter


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 14, 2004 6:42 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
If you are intrested in the 'row not found' event (causing the exception), then you could refresh()/get()/load()/lock() the object before executing your delete query.

Note that such error isn't likely to happen if you have proper version control (optimistic locking) in place. Read the related chapter in the doc - you may find some hints.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.