#1567 - SqlUpdate addBatch() ... with named parameters errors with PersistenceException: No batched statement found for key

This commit is contained in:
rob bygrave
2018-11-30 21:47:23 +13:00
parent 7fda8079c2
commit fcffa92c55
2 changed files with 32 additions and 1 deletions
@@ -135,7 +135,7 @@ public final class DefaultPersister implements Persister {
public int[] executeBatch(SpiSqlUpdate sqlUpdate, SpiTransaction transaction) {
BatchControl batchControl = transaction.getBatchControl();
try {
return batchControl.execute(sqlUpdate.getSql(), sqlUpdate.isGetGeneratedKeys());
return batchControl.execute(sqlUpdate.getGeneratedSql(), sqlUpdate.isGetGeneratedKeys());
} catch (SQLException e) {
throw transaction.translate(e.getMessage(), e);
}