在hibernate中查询记要数量的方法count

在hibernate中查询记录数量的方法count((Integer)s.createFilter(Cls.class, select count(*)).list().g

在hibernate中查询记录数量的方法count
((Integer)s.createFilter(Cls.class, "select count(*)").list().get(0)).intValue();