ethnarch wrote:
Why don't you just give it a try. I believe the order by clause will translate to the same order the database puts it in.
From the hql documentation
Quote:
The list returned by a query may be ordered by any property of a returned class or components:
http://www.hibernate.org/hib_docs/refer ... ering.htmlJust try it that would be the fastest way to find out!
Well it logically doesn't make sense. Yes I can order by last name, then first and then middle. But that will place first name "Scott Allen" AFTER first name "Scott" and middle name "Zebra" (given a common last name). It should be the other way around. Even worse, the first case above will not match "Scott" and "Allen", they'll be considered different names.
I'm able to work around this using HQL case statements, but would love a more elegant solution.