• Post Reply Bookmark Topic Watch Topic
  • New Topic

RecordNotFoundException thrown by getHibernateTemplate().delete(person)

Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Sorry about asking this question.

Does getHibernateTemplate().delete(person) throw some type of RecordNotFoundException.

I have java program that is required to do one of the following:-
a) If some how the person record has been deleted from the db before the above call
then we need to be able to detect some type of RecordNotFoundException thrown by calling getHibernateTemplate().delete(person)
b) If the person record has not been deleted from the db, but calling getHibernateTemplate().delete(person) has a problem
deleting the record, then RuntimeException is thrown.

I'm not sure to how to detect a RecordNotFoundException if I call getHibernateTemplate().delete(person)

What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!