-
Notifications
You must be signed in to change notification settings - Fork 101
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
QueryBuilder and an empty array in criteria #170
Comments
Are you sure that skipping the condition is the best solution? |
Not sure if there is any special null handling in Doctrine's DQL, but SQL: |
I think that skipping condition is proper solution. |
I see now. I agree that with |
My apologize, I wasn't clear enough in the description, that negation is indeed crucial. |
Passing an empty array as criteria's parameter, for example:
will result in SQL query containing:
and therefore returning an empty result set, which is quite unexpected.
It might be better to add aditional check for array emptiness and completely skip adding WHERE part to the query in case it's empty.
The text was updated successfully, but these errors were encountered: