【发布时间】:2016-02-09 13:15:20
【问题描述】:
我目前使用的Hql查询是
from ListAssessImpl x left join fetch x.reviews r where x.site in
(:currentSearchSite) and x.status = :status and 1=1 order by x.score
desc, x.name asc
ListAssessImpl 和评论是基于 ListAssessImpl Id 的评论中的一对多、多条记录。
如果我只能从基于 ListAssessImpl 的评论中获取最大值,我该如何修改查询。
我尝试使用 Max() ,但没有成功,我使用的是 Hibernate 3 和 spring 2.5
【问题讨论】: