There seems to be a bug within the projection implementation. I have a native query which result i want to map with projection to a interface. The interface has three getters which have the exact name as the returned columns by the native query. The result is now that the columns are mapped into the wrong properties in the interface (or its proxy).
I found that the problem may be in ResultProcessor Line 262 when the names get mapped to the columns. The names are in a wrong order. This wrong order is already present when the PropertyDescriptor instances are retrieved from the interface in DefaultProjectionInformation Line 48.
Hope this helps :)
Affects: 1.12.4 (Hopper SR4)
DATAJPA-980 Projections with native queries don't work as expected
The text was updated successfully, but these errors were encountered:
I just checked and it's definitely the way, Spring Data JPA executes the native query currently. We're getting back a plain list only where actually a Map is expected, as that would allow us a proper mapping of property names to columns returned