#29271: Chaining Filters on a Reverse Foreign Key Produces Multiple Joins
-------------------------------------+-------------------------------------
Reporter: Michael MacIntosh | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: filter chain | Triage Stage: Accepted
reverse foreign key |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Andrew Standley):
Thanks for the link Tim, but isn't the scope of #27936 quite a bit
different? That ticket is regarding possible changes to the
[https://docs.djangoproject.com/en/dev/topics/db/queries/#spanning-multi-
valued-relationships spanning multi-value relationships] documentation in
order to clarify the 'intended' functionality.
The issue I see is that the
[https://docs.djangoproject.com/en/2.0/topics/db/queries/#chaining-filters
chaining-filters] documentation appears to contradict the
[https://docs.djangoproject.com/en/dev/topics/db/queries/#spanning-multi-
valued-relationships spanning multi-value relationships] documentation.
My suggested changes would be more along the lines of
1) Adding a link to
[https://docs.djangoproject.com/en/2.0/topics/db/queries/#retrieving-
specific-objects-with-filters retrieving specific objects with filters] to
the [https://docs.djangoproject.com/en/2.0/ref/models/querysets/#filter
filter] docs, so the details of filter are more visible.
2) Adding a note to
[https://docs.djangoproject.com/en/2.0/topics/db/queries/#chaining-filters
chaining-filters] that references the behaviour is handled differently for
multi-value relationships and links to
[https://docs.djangoproject.com/en/dev/topics/db/queries/#spanning-multi-
valued-relationships spanning multi-value relationships] .
Also a side note for documentation: this ticket appears to be a duplicate
of #18437 as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/29271#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.b1ec6ce7e8522619472ce5352b68355a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.