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 count issue when deep filtering #13928
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13928 +/- ##
==========================================
- Coverage 55.35% 55.34% -0.01%
==========================================
Files 1258 1258
Lines 31699 31702 +3
Branches 5734 5735 +1
==========================================
Hits 17546 17546
- Misses 12337 12340 +3
Partials 1816 1816
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thank you for pursuing this @Bassel17 and @alexandrebodin ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does it do?
Changes the count implementation in the query builder, so it uses
countDistinct()
based on the column idWhy is it needed?
When counting with deep filters columns were counted multiple times based on their relation
How to test it?
Create a content type with a relation (one-to-many or many-to-many) (you can take a look at the issue linked below for more details) add multiple elements to the relation field and then try to get the content type while filtering on that field, the total in the meta should be correct.
Related issue(s)/PR(s)
fix #7631