You can count the number of query results without returning them:
你可以统计查询结果的数目而不必实际返回他们:
((Long)session.createQuery("select count(*) from ……").iterate().next() ).intValue()
You can count the number of query results without returning them:
你可以统计查询结果的数目而不必实际返回他们:
((Long)session.createQuery("select count(*) from ……").iterate().next() ).intValue()