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