I am wondering what is the best way to get map array from hibernate query. Google says to iterate query.list(), and create/put objects into empty map array.
I guess there would be some elegant and efficient way to do this. Could somebody give me idea?
I am wondering what is the best way to get map array from hibernate
Share
See Hibernate Documentation – 15.6. The select clause:
You can assign aliases to selected expressions using as:
This is most useful when used together with select new map:
This query returns a Map from aliases to selected values.