Hi
I have a table with several columns with unique constraints and I'd like to report all constraint violations in one round-trip, rather than having the user correct each one, one by one with many re-submits.
Currently, the way I'm detecting the violation is by flushing the session after a makePersistant call, catching the ConstraintViolationException and inspecting the exception message to determine which column was not unique.
Other than doing a select on each column with a unique constraint - to find out all the violations, has anyone come up with a better solution ?
Erik
|