Hi,
Is there an elegant way of handling a delete that fails due to a foreign key constraint?
@Transactional
| public String remove()
| {
| try
| {
| return super.remove();
| }
| catch (EntityExistsException ve)
| {
| log.warn("Caught entity exists exception");
| return "removed";
| }
| }
Allows me to catch the EntityExistsException, but I cannot directly catch
ConstraintViolationException. (which is still logged as an error by
AbstractFlushingEventListener).
cheers
phil
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092536#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...