-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem counting the resultset
PostPosted: Sun Oct 05, 2008 7:57 pm 
Beginner
Beginner

Joined: Thu Feb 21, 2008 3:31 pm
Posts: 34
Hi all,

I am implementing pagination in my GenericDAO and for simple queries, I find that pagination does work and I can determine the number of total results. However, whenever I do any joins, or the resultset does not return any values, I get an error instead of a boolean false.

Code:
org.hibernate.exception.GenericJDBCException: could not perform sequential read of results (forward)


I am just going to the end of the resultset
Code:
ScrollableResults scrollableResults = query.scroll(ScrollMode.FORWARD_ONLY);
            scrollableResults.last();
            int totalResults = scrollableResults.getRowNumber() + 1;
scrollableResults.close();


Any ideas? I was reading that there was a patch for this problem, but how would I go about patching hibernate?

http://opensource.atlassian.com/project ... e/HHH-1804

I don't see anything that shows this has been implemented in newer versions of hibernate.

Thanks,
Walter


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.