fix failed to translate HSQL contraint error to friendly message
added test for delete data that have child