-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Data JPA projection to records using native queries does not work #3394
Comments
Care to elaborate? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Well I like to contribute, but not sure how to implement it. I am thinking of a For simple cases which Record just contains, primitives, wrappers, and simple types such as String, Date, java.time classes (anything Spring |
I digged more in Spring Data JPA sources in class Well I am using named queries, as in our project using queries in annotations is prohibited (as queries are usually so long). |
A mismatch between using native-named-queries and native-queries within annotation, when I put the query text in annotation, the return type is now a But my named query was also native (and I have |
In Hibernate you can By the way Hibernate's |
Answers to this "problem" from Spring team here: #2757 |
I have used Interface based projection using native queries for long time, but now according to Spring Data JPA reference documentstions record-based projections must work too, but it seems it does not support custom native queries.
As proxied interfaces are not so friendly during debugging, using records would be great, but it seems the conversion does not work with records.
Can this issue be solved?
By the way I am using Spring Data 3.2.3 (latest release till now)
The text was updated successfully, but these errors were encountered: