| As one would expect, the same problem arises with scroll(), and presumably the corresponding method from org.hibernate.query.Query#stream(), which uses scroll() under the covers. If Session#createQuery(CriteriaQuery) does not return a org.hibernate.query.Query then it cannot be used as a replacement for the Criteria API, which provides a method for scrolling through results using a cursor. This will force Hibernate 4.x based applications to migrate to the HQL interface instead. |