We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

QueryBuilder->getColumns() returning null

I am using datatables plugin written by m1ome

I can't sort data as i always get $builder->getColumns() as null.

<?php
public function fromBuilder($builder, $columns = []) {
    if (empty($columns)) {
      $columns = $builder->getColumns();
      $columns = (is_array($columns)) ? $columns : array_map('trim', explode(',', $columns));
    }

    $adapter = new QueryBuilder($this->options['length']);
    $adapter->setBuilder($builder);
    $adapter->setParser($this->parser);
    $adapter->setColumns($columns);
    $this->response = $adapter->getResponse();

    return $this;
  }

Due to this, I can't sort the table. But this works if I exclusively set columns in the builder query. Previously, it was working on Phalcon < 4

edited Mar '20

How to get this? I need to get out of this and want solution. liteblue