criteria.setProjection(Projections.rowCount());
criteria.setProjection(null);
有关联查询统计后,要设置ResultTransformer,否则结果是Object[]
criteria.setResultTransformer(Criteria.ROOT_ENTITY);
转载于:https://blog.51cto.com/langaili/1217381
criteria.setProjection(Projections.rowCount());
criteria.setProjection(null);
有关联查询统计后,要设置ResultTransformer,否则结果是Object[]
criteria.setResultTransformer(Criteria.ROOT_ENTITY);
转载于:https://blog.51cto.com/langaili/1217381