What does session.createQuery("Query").scroll() return ?
-
ListResultSet
-
ResultSet
-
ScrollableResultSet
-
ScrollableResult
D
Correct answer
Explanation
The session.createQuery("Query").scroll() method returns a ScrollableResult, which allows you to scroll through query results both forward and backward. This is different from scroll() on a Criteria query which returns ScrollableResults. Note the singular 'Result' versus 'Results'.