Hi I am having problems with ScrollableResults. It appears to me that hibernate is not scrolling throught the results and is instead fetching everything into memory at once.
Does any body know why this may be happening. I am using Hibernate 3.2.6 with mysql Ver 14.12 Distrib 5.0.45,
and mysql-connector-java-5.1.7-bin.jar.
My query looks like this
Code:
return logReadOnlySession.createQuery(
"from AuditLog as agentLog" +
" where agentLog.timestamp" +
" between :startTime and :endTime" +
" order by agentLog.userID")
.setLong("startTime", summary.getStartTime())
.setLong("endTime", summary.getEndTime())
.setCacheMode(CacheMode.IGNORE)
.setFetchSize(AUDIT_LOGS_FETCH_SIZE)
.scroll(ScrollMode.FORWARD_ONLY);