日期:2014-05-18  浏览次数:20625 次

hibernate 级联查询排序问题
我有一个部门表 dept,一个员工表uses,部门表和员工表配了一对多的关系
我的hql语句是这样的
from dept d left join fetch users u 
我想得到的结果是查询按照dept表的时间排序和按照users表的时间排序,例如 from dept d left jion fetch users u order by d.makeTime desc,u.makeTime desc;
现在的问题 是排序不起作用,想请教怎样才能起作用呢

------解决方案--------------------