Skip to content

Commit f758829

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ private ReactiveStatelessSessionImpl(
150150
PersistenceContext persistenceContext) {
151151
super( factory, options );
152152
this.persistenceContext = persistenceContext;
153+
// StatelessSessionImpl constructor sets the Jdbc Batch Size to 0,
154+
// setting it to null allows getConfiguredJdbcBatchSize() to return correct configured size
155+
setJdbcBatchSize( null );
153156
Integer batchSize = getConfiguredJdbcBatchSize();
154157
reactiveConnection = batchSize == null || batchSize < 2
155158
? connection

0 commit comments

Comments
 (0)