xPDO query bounding and getResources snippet pagination interoperability
0 reputation · 30 Sept 2025, 20:37 UTC
Goal is to bound large resource result sets in ModX Revolution using xPDO limit/offset and present them via the getResources snippet pagination controls.
Assumptions are ModX Revolution with xPDO ORM and MySQL. getResources builds xPDO queries from limit, offset and page parameters. Offset-based paging is simple to configure but database scans skipped rows as offset grows. Snippet caching can return stale page counts if resources change between requests. Limit and offset semantics are version-sensitive and may interact differently with joins and filters. No built-in keyset pagination helpers are provided.
What is the exact mapping between getResources page/limit/offset parameters and xPDO setLimit/setOffset when filters and joins are present? Does snippet caching affect perceived correctness of bounded pages when the resource set changes between requests? Is there documented guidance for maintaining stable pagination boundaries without relying on increasing offsets?