hql通过时间排序

在你的hql中加上下述语句,记住一定要加在hql语句的最后,一定要加在hql语句的最后,一定要加在hql语句的最后,否则会报错

order by upDateDate desc    //upDateDate 是要按照该元素排序,你要换成你的

 例如:

String hql = "from LeaveReason where status = :status and student.clazz.teacher.ID = :ID and isDelete = :isDelete order by upDateDate desc";

猜你喜欢

转载自blog.csdn.net/qq_39429962/article/details/82862620