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

BUG: When changing SQLFilter parameter, resulting SQL query is not generated correctly #11694

Conversation

dbannik
Copy link
Contributor

@dbannik dbannik commented Oct 22, 2024

Is not correctly generated sql when changed/switched sqlFilter parameters

CachedPersisterContext::$selectJoinSql should be clear or regenerated when sqlFilter changed

The problem reproduce when in use fetch=EAGER and use additional sql filter on this property

@dbannik dbannik force-pushed the Bug-join-sql-when-change-sqlFilter-parameters branch from 6d81376 to b3735ef Compare October 22, 2024 16:22
@dbannik dbannik marked this pull request as ready for review October 22, 2024 16:28
@greg0ire
Copy link
Member

Please improve your commit message according to the contributing guide.

Most notably, please describe the bug, and explain how your changes address the issue.

@dbannik dbannik force-pushed the Bug-join-sql-when-change-sqlFilter-parameters branch 2 times, most recently from daad5e4 to 3717654 Compare October 22, 2024 19:32
@dbannik dbannik requested a review from greg0ire October 22, 2024 19:36
greg0ire
greg0ire previously approved these changes Oct 22, 2024
SenseException
SenseException previously approved these changes Oct 22, 2024
@greg0ire
Copy link
Member

🤔 why is this targeting 2.21.x?

@dbannik
Copy link
Contributor Author

dbannik commented Oct 23, 2024

@greg0ire I don't know which branch to merge into
in my case, in version 2.19 and higher, this problem is present

@greg0ire
Copy link
Member

Take a look at #11208

…ters

CachedPersisterContext::$selectJoinSql should be clear or regenerated when sqlFilter changed
The problem reproduce when in use fetch=EAGER and use additional sql filter on this property
@dbannik dbannik force-pushed the Bug-join-sql-when-change-sqlFilter-parameters branch from 210ba6e to 439b4da Compare October 23, 2024 09:05
@dbannik dbannik changed the base branch from 2.21.x to 2.20.x October 23, 2024 09:05
@dbannik dbannik dismissed SenseException’s stale review October 23, 2024 09:05

The base branch was changed.

dbannik added a commit to dbannik/orm that referenced this pull request Oct 23, 2024
dbannik added a commit to dbannik/orm that referenced this pull request Oct 23, 2024
@dbannik dbannik mentioned this pull request Oct 23, 2024
@dbannik
Copy link
Contributor Author

dbannik commented Oct 23, 2024

@greg0ire I sent it to 2.20 and prepared fixes #11695 for 3.3 and higher

dbannik added a commit to dbannik/orm that referenced this pull request Oct 23, 2024
dbannik added a commit to dbannik/orm that referenced this pull request Oct 23, 2024
@greg0ire greg0ire added this to the 2.20.1 milestone Oct 23, 2024
@greg0ire greg0ire merged commit 3ca9529 into doctrine:2.20.x Oct 23, 2024
75 checks passed
@greg0ire
Copy link
Member

Thanks @dbannik !

@dbannik dbannik deleted the Bug-join-sql-when-change-sqlFilter-parameters branch October 23, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants