findAll()
function and the page
and perPage
arguments.LIMIT
and OFFSET
, and the Microsoft SQL Server adapter will use TOP
and some tricky sub queries.) Turn on debugging in the ColdFusion Administrator if you want to see exactly what's going on under the hood.findAll()
statement around a little:findAll()
function on the Book class instead, and thereby we ensure that the pagination is based on the books and not the authors. In this case, we will always get 25 records back.pagination()
function which returns a struct with keys pagination().currentPage
, pagination().totalPages
and pagination().totalRecords
.