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.
Comment From: sbrannen
@mp911de, does this sound familiar to you?
Is this something we should investigate within the spring-r2dbc
module in Spring Framework?
Comment From: mp911de
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.
Comment From: wangxing-git
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.
Comment From: mp911de
In that case, this problem should be fixed in the MySQL driver. Paging @mirromutth.
Comment From: sbrannen
@mp911de, shall we close this issue in favor of an issue raised against r2dbc-mysql
?
Comment From: mp911de
Yes, please. I created mirromutth/r2dbc-mysql#149.
Comment From: pophils
This issue still exist with mysql driver. Got invalid mapping too. version 0.82
Comment From: isoqhakimov
Same situation with me. version 0.82