Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.11.11 (Ingalls SR11), 2.0.6 (Kay SR6)
-
Component/s: None
-
Labels:None
Description
Incorrectly mapped values on page summaries.
See https://github.com/spring-projects/spring-boot/issues/12720 for a test that reproduces the error.
The problem seems to come from this line in the test
Page<HotelSummary> hotels = this.repository.findByCity(city, new PageRequest(0, 10, Direction.ASC, "name"));
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?
Attachments
Issue Links
- relates to
-
DATACMNS-1284 Backport ASM-based property detection for projections
-
- Closed
-