I have method getListQuery() in my model, which return query. As we know, Joomla automically set limit and offset to query when we use JPagination. I have problem, that I want to use JPagination and fetch all rows in getListQuery(). As far as, I wrote code like
protected function getListQuery(){
// here is created my $query object with query
// I'm fetching all rows
$rows = $db->loadObjectList();
$this->rows = $rows;
return $query;
}
It means, query is executing 2 times: one by me in this method and one by Joomla core. I'm not so happy with this solution, because it causes page loads 2x longer. Query has about 10 joins... With milions of rows it's really problem. Do you see any right solution?