spring-boot-data-r2dbc-jooq
spring-boot-data-r2dbc-jooq copied to clipboard
`executeReturningOne` is inconsistent with `fetchOne`
While fetchOne
is returning at most 1 record it also fails if more than 1 record is returned by the query.
The latter is not true for executeReturningOne
, it actually behaves like fetchAny
.
Should be trivial to change executeReturningOne
to return Mono.error
in case of more than 1 record or maybe just replace the whole method with return executeReturning(query).singleOrEmpty()
.
Thanks for your report. I think the R2DBC wrapper should behave like the original JOOQ methods.
In addition we should improve test coverage with some negative tests. Maybe further issues like this one can be uncovered.