changed DoctrinePaginator to use cursors instead of query builders