#1507 - SqlUpdate.execute PersistenceException is not translated into more specific exception (like DuplicateKeyException)

Support for sqlUpdate.executeBatch()
This commit is contained in:
rob bygrave
2018-10-15 22:30:42 +13:00
parent 3eaf47fd70
commit 2646e8c27f
2 changed files with 24 additions and 1 deletions
@@ -137,7 +137,7 @@ public final class DefaultPersister implements Persister {
try {
return batchControl.execute(sqlUpdate.getSql(), sqlUpdate.isGetGeneratedKeys());
} catch (SQLException e) {
throw new PersistenceException(e);
throw transaction.translate(e.getMessage(), e);
}
}