I cloned the Pagination (PHP + SS) code from the Blog module and am attempting to use it on a different DataObject (some custom search results), and am having considerable trouble getting it to work.
In the blog module, in which BlogHolder.php uses DataObject::get() to get the pages, the pagination works fine. I am echoing "$this->totalSize" from DataObjectSet.php and seeing that the total number of results is accurate. However, my custom search uses DB::query(), and although I am returning the data AS a DataObjectSet, "$this->totalSize" is totally off. It's saying the size is 12 even though there are 29 results. Obviously, if I don't know the total number of items, the paging won't work.
I don't see the difference in how the data is being returned here. Any ideas??