hql得到一个实体的数量
Session session=this.getSession;
string hql="select count(tb) from table tb";
Query query=session.createQuery(hql);
int count=(Integer)query.uniqueResult();
Session session=this.getSession;
string hql="select count(tb) from table tb";
Query query=session.createQuery(hql);
int count=(Integer)query.uniqueResult();