Closed jmrandol closed 2 months ago
Tried to delve into this a little bit. I can't pinpoint exactly where it seems to be going wrong, but at some point the embedded prefix is dropped or ignored when attempting to get the embedded id property from the RowDocument
.
The failure happens here: https://github.com/spring-projects/spring-data-relational/blob/main/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/MappingJdbcConverter.java#L343 because the idProperty
does not contain the embedded prefix.
This appears to be working again in 3.3.0!
I ran into an issue where I'm querying entities using
NamedParameterJdbcTemplate
and the mapping logic gets confused. See attached code example.In 3.1.x, the tests pass. Everything is mapped correctly when querying for
PersonPlace
entities, but when I attempted an upgrade to 3.2.2, the mapping logic looks to have changed significantly (BasicJdbcConverter
toMappingJdbcConverter
) and is now trying to incorrectly map the ID fields. Whether this is a bug or I'm doing this way wrong and 3.2.x is revealing that would be nice to know.test-database.zip