Good, I am trying to make a simple relationship between two tables, but when I put the where clause, it shows that it does not find the idcentro column.
I detail the controller code and the image of the tables.
In the community version it works without problems.
<p>Type: PDOException</p>
<p>Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'idcentro' in 'where clause'</p>
<p>Filename: /var/www/vhosts/control.instalnox.com/httpdocs/application/libraries/GroceryCrudEnterprise/zendframework/zend-db/src/Adapter/Driver/Pdo/Connection.php</p>
<p>Line Number: 360</p>
function list_contrato() {
$crud = $this->_getGroceryCrudEnterprise();
$center = $this->session->userdata('idcentro');
$crud->settable('contrato');
$crud->setsubject('Contratos');
$crud->columns(['idpersona','descripcion','fechadesde','fechahasta','numerohora'])
->displayas('idpersona','Trabajador')
->displayas('descripcion','Descripción')
->displayas('fechadesde','Desde fecha')
->displayas('fechahasta','Hasta fecha')
->displayas('numerohora','Horas semanales');
$crud->requiredfields(['idpersona','descripcion','fechadesde','numerohora']);
// $crud->setrules('fechahasta', 'Hasta', 'callback_valid_date');
$crud->setrelation('idpersona','persona','{apellido}, {nombre}',['idcentro'=>$center]);
$crud->where(['idcentro'=>$center]);
$output = $crud->render();
$this->_main_output($output);
}