Fix/3.x/issue 3047

If there is no comparator, only Comparable objects are supported for pagination.

Fixes #3047