Hi, i am learning how to use the @CommitAfter annotation, but i want
to catch the exception when the database does not allows to delete a
record and thus to show the user a friendly  messages like "X can't be
deleted, check if it is not being in use in Z", or other messages
based on the hibernateException thrown.
The case is that when i do XDAO.delete(X) in the page method
onActionFromDelete annotated with @CommitAfter, hibernate does not
actually delete the record at this moment, instead is "scheduled" for
deletion, so the deletion is attempted when the commit method is
called, but this is not doit inside my action method so i can't catch
it.
 I don´t want to do this checks manually because de database is doing
this job for me (may be i'm too lazy ;).

That may be the best approach for this?

Thanks

César.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to