Closed elpoutro closed 5 years ago
Pushing https://github.com/stwe/DatatablesBundle/pull/870 has made reappear the issue https://github.com/doctrine/doctrine2/issues/6363.
I have reproduce trying something like that:
` $this->columnBuilder->add('structurePath', Column::class, array(
'title' => 'structure path', 'searchable' => true, 'dql' => '(SELECT GROUP_CONCAT({s}.label SEPARATOR \' \') FROM '.Structure::class.' {s} WHERE {s}.lft <= structure.lft and {s}.rgt >= structure.rgt and {s}.root = structure.root)', 'type_of_field' => 'string', 'filter' => array(TextFilter::class, array( 'search_type' => 'like%', )) ));
` So I suggest this correction according to the existing solution.
Just for understanding, Why just not throw an exception when someone try to use "like" with a subquery (or "CASE WHEN" or something else than a string expression)?
Pushing https://github.com/stwe/DatatablesBundle/pull/870 has made reappear the issue https://github.com/doctrine/doctrine2/issues/6363.
I have reproduce trying something like that:
` $this->columnBuilder->add('structurePath', Column::class, array(
` So I suggest this correction according to the existing solution.