-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDC-1952: Add support for array parameters on the SQLFilter #2624
Comments
Comment created by petr.pavel: I've just created a pull request that implements just that. The only difference is that you don't call implode on the parameter when using it. The usage would be:
|
Comment created by @doctrinebot: |
Comment created by @doctrinebot: |
mnogales
added a commit
to mnogales/doctrine2
that referenced
this issue
Dec 22, 2015
mnogales
added a commit
to mnogales/doctrine2
that referenced
this issue
Dec 22, 2015
mnogales
added a commit
to mnogales/doctrine2
that referenced
this issue
Dec 22, 2015
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Dec 6, 2020
…avoid ambiguities.
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Dec 6, 2020
… hashing concerns.
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Dec 6, 2020
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Dec 6, 2020
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Dec 6, 2020
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Dec 6, 2020
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
…avoid ambiguities.
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
… hashing concerns.
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
beberlei
added a commit
to beberlei/doctrine2
that referenced
this issue
Feb 28, 2021
beberlei
added a commit
that referenced
this issue
Apr 19, 2021
* #1168 Add support for array parameters on the SQLFilter * DDC-1168 Add support for array parameters on the SQLFilter * [GH-2624] Rework array support to use new getParameterList() * [DDC-1952] Change at() mocking to using returnCallback() * [DDC-1952] Make arrays of values explicit with new setParameterList * Adjust tests to use country as list and locale as single value. * [DDC-1952] Add tests for new exxeption conditions. * Apply suggestions from code review Co-authored-by: Grégoire Paris <[email protected]> Co-authored-by: Manuel Nogales <[email protected]> Co-authored-by: Grégoire Paris <[email protected]>
Implemented by #8375 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jira issue originally created by user holtkamp:
The SQLFilter currently only accepts string parameters which would result in SQL like:
To filter an Entity that has a lifecycle, this can be usefull to filter Entities that are in a specific state, for example:
To be able to apply the filter on an Entity that can be in multiple states, it is usefull to be able to assign an array of states using setParameter:
to eventually result in:
However, this is currently not supported, it seems to go wrong on the PDO::quote() of the parameter. The SQL works ok when setting it statically in the filter, not taking the parameter into account.
It would be nice to have support for arrays on the setParameter()
The text was updated successfully, but these errors were encountered: