Skip to content

Commit 6386112

Browse files
committed
[hibernate#2108] StatelessSession insertAll in batch does not do batching
1 parent 98b3e22 commit 6386112

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/session/impl/ReactiveStatelessSessionImpl.java

+6
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ private ReactiveStatelessSessionImpl(
150150
PersistenceContext persistenceContext) {
151151
super( factory, options );
152152
this.persistenceContext = persistenceContext;
153+
/*
154+
the StatelessSessionImpl constructor sets the Jdbc Batch Size to 0,
155+
we need to set it to null in order to get the correct configured size
156+
from getConfiguredJdbcBatchSize;
157+
*/
158+
setJdbcBatchSize( null );
153159
Integer batchSize = getConfiguredJdbcBatchSize();
154160
reactiveConnection = batchSize == null || batchSize < 2
155161
? connection

0 commit comments

Comments
 (0)