diff --git a/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt b/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt index 2a35938de9..a26b2d5f13 100644 --- a/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt +++ b/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt @@ -83,7 +83,7 @@ open class InsertStatement(val table: Table, val isIgnore: Boolean = fa } protected open fun PreparedStatement.execInsertFunction() : Pair { - val inserted = if (arguments().count() > 1 || isAlwaysBatch) executeBatch().sum() else executeUpdate() + val inserted = if (arguments().count() > 1 || isAlwaysBatch) executeBatch().count() else executeUpdate() val rs = if (autoIncColumns.isNotEmpty()) { generatedKeys } else null return inserted to rs }