Repository navigation
fix(doctrine): left join nested props in OrFilter - #8674
Merged
Merged
Conversation
soyuka
added a commit
that referenced
this pull request
Nov 4, 2026
…OR groups (#8777) * fix(doctrine): left join collection associations in IriFilter inside OR groups When an IriFilter on a collection association (e.g. `tags`) is grouped with other conditions in an OrFilter, it always added an INNER JOIN, so rows matching only the other branches but having an empty collection were dropped. It now uses the same join type helper as the nested property joins (#8674). * refactor(doctrine): drop IriFilter join comment --------- Co-authored-by: soyuka <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nested properties searched through
FreeTextQueryFilter(new OrFilter(...))used an INNER JOIN (ORM) or an$unwindwithoutpreserveNullAndEmptyArrays(ODM). Root rows with a null relation were dropped before the OR ran, even when a scalar property matched.Under OR, ORM nested filters now LEFT JOIN and ODM nested filters keep the nulls. Plain AND is unchanged, a unit test pins the INNER JOIN there. The functional test also runs on MongoDB, it's the first run of the ODM path as I couldn't install ODM locally.
Note: if an AND filter already added an INNER JOIN on the same relation it's reused, results don't change as the AND filter requires the relation anyway.