spring-projects / spring-data-relational

Spring Data Relational. Home of Spring Data JDBC and Spring Data R2DBC.
https://spring.io/projects/spring-data-jdbc
Apache License 2.0
753 stars 345 forks source link

`Row` to Entity Converter no longer used #1710

Closed mlegenovic closed 8 months ago

mlegenovic commented 8 months ago

According to the documentation (Overriding Mapping with Explicit Converters) it should be possible to create custom mapper with a Row2Entity converter.

This worked quite well until version 3.2.0. As of this version, all Row ->Entity converters are ignored.

Is this a bug, or intentional, just the documentation not adapted?

mp911de commented 8 months ago

You are right, this is a regression. We migrated row reading into an intermediate type so that applications no longer need to consume uni-directional types. However, the migration isn't complete. We now use RowDocument to store all information instead of Row. We need to reinstate the Row-based approach.

Long-term, the mismatch between converters (Reading Row -> Entity, Writing Entity -> OutboundRow) will be resolved into Entity <-> RowDocument.

Until then, we have to fix this regression. Thanks for letting us know.