-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inserting Flux of Items Inserts Only One Item When Retrieving the Number of Rows Updated #374
Comments
Here is a minimal repository with the failing code in the test: |
Feel free to submit a pull request. Please note that our |
@mp911de |
R2DBC's |
Actually, I wasn't able to get the project to build fully on my machine (had a couple failing integration tests.) Do you have any advice for that? Also, thanks for letting me know it will be deprecated. What database client is it being replaced with? |
This is caused by line
https://github.com/spring-projects/spring-data-r2dbc/blob/master/src/main/java/org/springframework/data/r2dbc/core/DefaultDatabaseClient.java#L1162.
Line
return Mono.from(objectToInsert).flatMapMany(toInsert -> exchange(toInsert, mappingFunction).rowsUpdated()) .collect(Collectors.summingInt(Integer::intValue));
should be
return Flux.from(objectToInsert).flatMapMany(toInsert -> exchange(toInsert, mappingFunction).rowsUpdated()) .collect(Collectors.summingInt(Integer::intValue));
I can create an example project showing this error and submit a pull request with a fix if you wish.
The text was updated successfully, but these errors were encountered: