Hello,
I have a Member pojo:
Code:
class Member {
long id;
Country country;
}
Code:
class Country {
long id;
Map titles; // {Locale= String}
}
Map contains Locales and the country title for the specific locale.
I want to get all Members ordered by the titles of their countries for a specific locale. Criteria query does not support this so I am trying to do so using hql.
Using the indices function, I can match the locale that I desire, by I can't seem to be able to achieve the ordering.
My query is:
Code:
from Member
where :locale in indices(country.titles)
order by elements(country.titles)
which of course produces an error. I there I way I can request something like this?? Which of course also produces an error:
Code:
from Member
where :locale in indices(country.titles)
order by country.titles.title
Thanks,
akz