VIRGIN FOREST OF JAVA
不要埋头苦干,要学习,学习,再学习。。。。。
powered by R.Zeus
There are several approaches to get the size of a list.
1. select cout(*) is ok, but forces you to a new select statement
2. try using a filter
3. use scrollable resultsets:
ScrollableResult scroll = query.scroll();
scroll.afterLast();
int size = scroll.rowNumber();
scroll.beforeFirst();


Which approach ist best, depends on your select.
posted on 2006-09-11 15:00 R.Zeus 阅读(234) 评论(0)  编辑  收藏 所属分类: Hibernate

只有注册用户登录后才能发表评论。


网站导航: