hibernate支持 order by 子句排序?

来源:百度知道 编辑:UC知道 时间:2024/07/06 14:05:40
hibernate支持这种方式?
order by (select... )

支持的化怎么写

没有分了 这是我全部的分
hibernate 目前不支持 这种查询

但可以通过关联关系 实现 例如:
order by a.b.c

支持。
跟sql一样的用在最后写就好了。

查询返回的列表(list)可以按照一个返回的类或组件(components)中的任何属性(property)进行排序:

from DomesticCat cat
order by cat.name asc, cat.weight desc, cat.birthdate
可选的asc或desc关键字指明了按照升序或降序进行排序.