I think I found an issue working with database->select using join together with PagerSelectExtender: they're not agreed to work together!
$pager_data = $this->database->select('table_a', 'a')
->extend(PagerSelectExtender::class)
->fields('a', array('field1', 'field2'))
->orderBy('field1', 'DESC')
->limit(4)
->execute()
->fetchAllAssoc('id');
this works fine! But if I add a join it fails:
$pager_data = $this->database->select('table_a', 'a')
->extend(PagerSelectExtender::class)
->fields('a', array('field1', 'field2'))
->join('ges_casse','b','b.id=a.bid')
->fields('b', array('field3'))
->orderBy('field1', 'DESC')
->limit(4)
->execute()
->fetchAllAssoc('id');
If I remove the PagerSelectExtender the join works well.
Comments
Query break up needed