Skip to content

Commit ee359ae

Browse files
authored
fix: prevent batch insert loss during unique validation, thx to 014-code #866
fix: prevent batch insert loss during unique validation
2 parents 5ac449c + 1f41d45 commit ee359ae

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

APIJSONORM/src/main/java/apijson/orm/AbstractVerifier.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,8 @@ public static <T, M extends Map<String, Object>, L extends List<Object>> void ve
18141814
config.setTable(table);
18151815
param.forEach((key,value) -> config.putWhere(key, value, false));
18161816

1817-
SQLExecutor<T, M, L> executor = parser.getSQLExecutor();
1817+
SQLExecutor<T, M, L> executor = parser.createSQLExecutor();
1818+
executor.setParser(parser);
18181819
try {
18191820
M result = executor.execute(config, false);
18201821
if (result == null) {
@@ -1902,7 +1903,8 @@ public static <T, M extends Map<String, Object>, L extends List<Object>> void ve
19021903
}
19031904
param.forEach((key,value) -> config.putWhere(key,value, false));
19041905

1905-
SQLExecutor<T, M, L> executor = parser.getSQLExecutor();
1906+
SQLExecutor<T, M, L> executor = parser.createSQLExecutor();
1907+
executor.setParser(parser);
19061908
try {
19071909
M result = executor.execute(config, false);
19081910
if (result == null) {

0 commit comments

Comments
 (0)