#19222: Documentation for use_for_related_fields should clarify that it doesn't
work for intermediate joins
-------------------------------+--------------------
     Reporter:  andrewbadr     |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  1.4
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 I have a custom Manager to filter out model instances with where the field
 `deleted` is `True`. I'm using an ORM query that looks like
 `user1.page_set.filter(membership__user=user2)`. The option
 `use_for_related_fields=True` is set on the relevant manager.

 My expectation is that `Membership` objects with the deleted flag set are
 not included in the query. Instead, they are being included.

 The documentation for `use_for_related_fields` should should specify that
 it doesn't work in this case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19222>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to