Opened 12 years ago

Last modified 8 years ago

#19222 closed Cleanup/optimization

Documentation for use_for_related_fields should clarify that it doesn't work for intermediate joins — at Initial Version

Reported by: Andrew Badr Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top