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

fix(doctrine): Fixed ORM DateFilter applying inner join when no filtering values have been provided #6849

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

psihius
Copy link
Contributor

@psihius psihius commented Dec 5, 2024

Q A
Branch? 4.0
Tickets None
License MIT
Doc PR

DateFilter applies an inner join on nested property relations even when no values to filter on are provided. This update adds a check ensuring the values array is not empty before applying the join.

Without this fix, simply defining a DateFilter on nullable relations in GraphQL excludes all records lacking related entities, due to the nature of INNER JOIN.

@psihius psihius changed the title [Bugfix] Don't apply INNER JOIN when ORM DateFilter has no actual filter values submitted fix(Filters): Don't apply INNER JOIN when ORM DateFilter has no actual filter values submitted Dec 5, 2024
@psihius psihius changed the base branch from main to 4.0 December 5, 2024 22:22
@psihius psihius changed the title fix(Filters): Don't apply INNER JOIN when ORM DateFilter has no actual filter values submitted fix(doctrine): Fixed ORM DateFilter applying inner join when no filtering values have been provided Dec 5, 2024

Verified

This commit was signed with the committer’s verified signature.
soyuka Antoine Bluchet
…ring values have been provided
@soyuka soyuka changed the base branch from 4.0 to 3.4 December 6, 2024 10:29
@soyuka soyuka merged commit d312eae into api-platform:3.4 Dec 6, 2024
78 checks passed
@psihius psihius deleted the patch-3 branch December 12, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants