1

如何在不选择列的情况下进行分组?

detachedCriteria.setProjection(Projections.groupProperty("col1")); 

或者

detachedCriteria.setProjection(Projections.sqlGroupProjection("col1", "col1", new String[]{}, new Type[] {Hibernate.INTEGER}));
4

0 回答 0