这个问题很老,但这可能仍然可以帮助其他人。现在,您可以使用HQL返回带有hibernate状态的地图。使用这样的东西:
select new map( max(bodyWeight) as max, min(bodyWeight) as min, count(*) as n ) from Cat cat
从hibernate文档中:http :
//docs.jboss.org/hibernate/orm/3.3/reference/en/html/queryhql.html#queryhql-
select



