Affects: 5.3.1
var collectList = r2dbcEntityTemplate.databaseClient.sql("""
select * from pending_message
""".trimIndent())
// .map(EntityRowMapper(PendingMessage::class.java,r2dbcConverter))
.fetch()
.all()
.collectList().block()
When I use DatabaseClient, the fetch method is mapped incorrectly.
For example:
the order of returned field values is: a -> a, b -> b, c -> c, d -> d,
But the final map obtained is: c -> a, a -> b, d -> c, b -> d.
@mp911de, does this sound familiar to you?
Is this something we should investigate within the spring-r2dbc module in Spring Framework?
Thanks for the ping. We've seen a similar issue in Spring Data R2DBC (https://github.com/spring-projects/spring-data-r2dbc/issues/478) that was caused by the Postgres driver. It was fixed in the driver (https://github.com/pgjdbc/r2dbc-postgresql/issues/337) in version 0.8.6.RELEASE.
@wangxing-git which driver and version of the driver are you using?
The underlying cause is a difference in column metadata iteration order vs. the result column order.
Thanks for the ping. We've seen a similar issue in Spring Data R2DBC (spring-projects/spring-data-r2dbc#478) that was caused by the Postgres driver. It was fixed in the driver (pgjdbc/r2dbc-postgresql#337) in version 0.8.6.RELEASE.
@wangxing-git which driver and version of the driver are you using?
The underlying cause is a difference in column metadata iteration order vs. the result column order.
The mysql driver I use, the version is 8.0.22.
r2dbc-bom version is Arabba-SR8.
In that case, this problem should be fixed in the MySQL driver. Paging @mirromutth.
@mp911de, shall we close this issue in favor of an issue raised against r2dbc-mysql?
Yes, please. I created mirromutth/r2dbc-mysql#149.
Most helpful comment
Yes, please. I created mirromutth/r2dbc-mysql#149.