Pagination on collections.
Fix for databases that needs subqueries (Oracle)