forum.hibernate.org/viewtopic.php?p=2378849
one of the posters gives this answer:
You need to create a Projection (...), give it an alias and you can then sort by the alias. No time to post the details but I'm pretty sure that would work.
Could someone provide a simple example, using the Criteria API, of a query that uses a Projection to do a subquery, and then uses that subquery as an Alias, and then orders by that Alias?
cheers!