From 5c718cd2204242cc31b3bdc473541c023fdc7285 Mon Sep 17 00:00:00 2001 From: Bkm016 Date: Tue, 26 Sep 2023 13:34:36 +0800 Subject: [PATCH] [publish] 6.0.12 (fix saveChanges()) --- .../main/kotlin/taboolib/module/database/ExecutableSource.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/module-database-core/src/main/kotlin/taboolib/module/database/ExecutableSource.kt b/module/module-database-core/src/main/kotlin/taboolib/module/database/ExecutableSource.kt index ad3edd4ca..1de23055e 100644 --- a/module/module-database-core/src/main/kotlin/taboolib/module/database/ExecutableSource.kt +++ b/module/module-database-core/src/main/kotlin/taboolib/module/database/ExecutableSource.kt @@ -104,7 +104,7 @@ open class ExecutableSource(val table: Table<*, *>, var dataSource: DataSource, */ open fun saveChanges(): Result { // 使用 autoCommit 的同时也可以判断是否成功取到了连接 - return if (connection.autoCommit) { + return if (!connection.autoCommit) { try { // 执行所有的处理器 processors.forEach { it.run() }