You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grails.orm.PagedResultList is a deprecated class which points to using org.grails.orm.hibernate.query.PagedResultList instead.
When calling BuildableCriteria#list, the method grails.orm.HibernateCriteriaBuilder#createPagedResultList builds a grails.orm.PagedResultList which can not be casted to the new org.grails.orm.hibernate.query.PagedResultList.
/** * A result list for Criteria list calls, which is aware of the totalCount for * the paged result. * * @author Siegfried Puchbauer * @since 1.0 * @deprecated Use {@link org.grails.orm.hibernate.query.PagedResultList} instead. */@SuppressWarnings({"unchecked","rawtypes"})
@DeprecatedpublicclassPagedResultListextendsgrails.gorm.PagedResultList
Casting to the parent of both classes grails.gorm.PagedResultList causes another bug where if a caller asks for a page beyond the last, which has 0 elements in it, the method grails.gorm.PagedResultList#initialize finds a null query and defaults to 0 total results, because all the constructors of grails.orm.PagedResultList push a null query to the super constructor:
Tested both in 7.2.1& 8.1.0
grails.orm.PagedResultList
is a deprecated class which points to usingorg.grails.orm.hibernate.query.PagedResultList
instead.When calling
BuildableCriteria#list
, the methodgrails.orm.HibernateCriteriaBuilder#createPagedResultList
builds agrails.orm.PagedResultList
which can not be casted to the neworg.grails.orm.hibernate.query.PagedResultList
.Casting to the parent of both classes
grails.gorm.PagedResultList
causes another bug where if a caller asks for a page beyond the last, which has 0 elements in it, the methodgrails.gorm.PagedResultList#initialize
finds a nullquery
and defaults to 0 total results, because all the constructors ofgrails.orm.PagedResultList
push anull
query to the super constructor:Constructors of
grails.orm.PagedResultList
:Affected method:
The text was updated successfully, but these errors were encountered: