We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I came across the case where I wanted to query all Tags which have a certain property set on the related model like:
>>>Tag.objects.filter(food__is_vegetarian=True) [<Tag: salad>, <Tag: salad>, <Tag: fruit>, <Tag: fruit>]
which can be easily solved by the given example for the Food query here by adding the .distinct() call.
Food
.distinct()
Once you think about it, it is obvious but maybe we can just add it to be more explicit on this regard.
The text was updated successfully, but these errors were encountered:
AmaMidzu
No branches or pull requests
I came across the case where I wanted to query all Tags which have a certain property set on the related model like:
which can be easily solved by the given example for the
Food
query here by adding the.distinct()
call.Once you think about it, it is obvious but maybe we can just add it to be more explicit on this regard.
The text was updated successfully, but these errors were encountered: