For some reason the HotelSummary seems to have data mapped to the wrong methods. Digging in a bit, the problem appears to be somewhere in org.springframework.data.repository.query.ResultProcessor. Specifically getProjectionTarget is called with a source containing the following:
[Atlanta,GA,USA, Doubletree, 2.0]
And attempts to convert it using toMap. This gets passed the following names:
[averageRating, city, name]
There are not in the same order. Perhaps DefaultProjectionInformation.collectDescriptors is not returning methods in a defined order. Possibly related to SPR-16675?
Issue Links:
DATACMNS-1284 Backport ASM-based property detection for projections
That's resolved with the backport of DATACMNS-1206 tracked in DATACMNS-1284. We strongly recommend to upgrade to a recent Hibernate, even if on Boot 1.5
Phil Webb opened DATAJPA-1309 and commented
Incorrectly mapped values on page summaries.
See spring-projects/spring-boot#12720 for a test that reproduces the error.
The problem seems to come from this line in the test
For some reason the
HotelSummary
seems to have data mapped to the wrong methods. Digging in a bit, the problem appears to be somewhere inorg.springframework.data.repository.query.ResultProcessor
. SpecificallygetProjectionTarget
is called with a source containing the following:And attempts to convert it using
toMap
. This gets passed the followingnames
:There are not in the same order. Perhaps
DefaultProjectionInformation.collectDescriptors
is not returning methods in a defined order. Possibly related to SPR-16675?Issue Links:
Backported to: 1.11.11 (Ingalls SR11)
The text was updated successfully, but these errors were encountered: