-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow returning Map from the repository methods #3636
Comments
Thank you for getting in touch. I had a look at our reference documentation but could not spot anything mentioning this behaviour. So, unless I'm missing something here, this seems to be a documentation issue. |
Hey @christophstrobl! |
Yes, you could have something like:
I'll update the documentation. |
I've not found any similar issue, so I'm creating a new one.
Problem:
The problem is that sometimes native queries are quite complicated, and it is possible that they would return unknown at declaration time number of columns. I'm not saying it is a great way of doing things, but that's just what we have in our case, for instance.
And in this case we cannot really return any kind of projection, since we do not know anything about the structure of the result set being returned at compile time.
Solution (Proposal):
I think it makes sense to consider allowing returning the
Map
from the repository query method, like:In this case, the key is supposed to be the column name, and the value is just a raw column value.
The text was updated successfully, but these errors were encountered: