Skip to content
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

Fixed invalid DQL #6242

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Fixed invalid DQL #6242

merged 1 commit into from
Apr 16, 2024

Conversation

alshenetsky
Copy link
Contributor

Fixes #6223

When searching text having only integer fields, an invalid DQL like SELECT entity FROM App\Entity\Product entity WHERE is generated because there are no any $queryTermConditions. This PR should fix the issue.

@javiereguiluz
Copy link
Collaborator

Thanks for fixing this bug Alexey.

@javiereguiluz javiereguiluz merged commit 5e1e6d0 into EasyCorp:4.x Apr 16, 2024
11 checks passed
@janklan
Copy link

janklan commented Apr 16, 2024

This change broke PostgreSQL search function. I'm getting the following error:

An exception occurred while executing a query: SQLSTATE[42883]: Undefined function: 7 ERROR: function lower(integer) does not exist
LINE 1: ...yee_code) ILIKE $7 OR LOWER(e0_.role) ILIKE $8 OR LOWER(e0_....
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

@javiereguiluz, considering it's a fresh change, would it make sense to reverse it before everyone installs it? It will break every search query where PostgreSQL and integers are involved.

@alshenetsky
Copy link
Contributor Author

alshenetsky commented Apr 17, 2024

Sorry, my bad :(
I've prepared another PR to remedy this situation: #6262
UPD:
It actually makes sense to revert this change and merge #6227 instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants