Hello,
I have a pagination issue as it seemed it always retrieves the first page items.
Here is my source code:
Code:
public void testPaginationIgnoresChildren() {
Page<Admin> page = adminDao.findAll(1, 2);
List<Admin> admins = page.getPageItems();
assertEquals(admin2.getFirstname(), admins.get(0).getFirstname());
assertEquals(admin1.getFirstname(), admins.get(1).getFirstname());
page = adminDao.findAll(2, 2);
assertEquals(admin0.getFirstname(), admins.get(0).getFirstname());
}
My mistake was that I forgot to have the following statement:
admins = page.getPageItems();
right after the second findAll.