Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Conversation

@elpoutro
Copy link

Pushing #870 has made reappear the issue doctrine/orm#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.

@elpoutro
Copy link
Author

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)?

@Seb33300 Seb33300 merged commit 51cebfd into stwe:master Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants