doctrine / orm

Doctrine Object Relational Mapper (ORM)
https://www.doctrine-project.org/projects/orm.html
MIT License
9.94k stars 2.52k forks source link

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

Closed dbannik closed 1 month ago

dbannik commented 1 month ago

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

greg0ire commented 1 month ago

Please improve your commit message according to the contributing guide.

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

greg0ire commented 1 month ago

:thinking: why is this targeting 2.21.x?

dbannik commented 1 month ago

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

greg0ire commented 1 month ago

Take a look at https://github.com/doctrine/orm/issues/11208

dbannik commented 1 month ago

@greg0ire I sent it to 2.20 and prepared fixes https://github.com/doctrine/orm/pull/11695 for 3.3 and higher

greg0ire commented 1 month ago

Thanks @dbannik !