From bf6c7e21b5173778270c85a9020d7f19beb8f2ad Mon Sep 17 00:00:00 2001 From: Roland Praml Date: Tue, 8 Oct 2024 13:13:17 +0200 Subject: [PATCH] Fix: after DB.inserAll, transaction may stay in batchmode --- .../main/java/io/ebeaninternal/server/core/DefaultServer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java index 0c5a8b45f3..5d7768c59f 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java @@ -1689,6 +1689,7 @@ public void insertAll(@Nullable Collection beans, InsertOptions options, @Nul for (Object bean : beans) { persister.insert(checkEntityBean(bean), options, txn); } + txn.flushBatchOnCollection(); return 0; }, transaction); }