Hi shynate26,
the library and Criteria works fine for all cases but this one. Normally, it returns List<Employee> and I am happy with that. Just in one very special occasion, I need to order the Employees by an SQL subselect. I have successfully added this subselect as the Projections.sqlProjection(...), and I do ordering by NativeSQLOrder, see
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2381. So far, all is fine. The list is ordered as I want. (The user can add more order or filter criteria in the UI and it is still working). I just cannot find an easy solution, how to get the Employee object from the Criteria result. Currently, I have implemented the solution 1). It works, but I do not find it optimal.