spring-data-native-query-projection icon indicating copy to clipboard operation
spring-data-native-query-projection copied to clipboard

Do we know why the nativeQuery projections fail?

Open upiw opened this issue 7 years ago • 2 comments

I have just run into this problem in my project. I found your example whilst googling the problem.

I see your comment that the nativeQuery tests fail!

Any idea why or how to get around this without resorting to returning Collection<Object[]> ?

upiw avatar Nov 02 '17 03:11 upiw

Yeah, this was a demonstration project for a Spring Data bug that I raised: https://jira.spring.io/browse/DATAJPA-980

It has now been fixed but it relies on some changes in Hibernate so you need to be running version Hibernate 5.2.11 or newer with Spring Data 1.10.12 (Hopper SR12), 1.11.8 (Ingalls SR8) or 2.0 GA (Kay)

roberthunt avatar Nov 02 '17 11:11 roberthunt

Still can't make it work with native query, would you mind updating the project in order to provide newer dependency versions and fix the tests? I might provide a pull request myself as well.

xtremebiker avatar Nov 16 '17 07:11 xtremebiker