Multiple choice technology programming languages

What does session.createQuery("Query").scroll() return ?

  1. ListResultSet

  2. ResultSet

  3. ScrollableResultSet

  4. ScrollableResult

Reveal answer Fill a bubble to check yourself
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'.