Documentation for use_for_related_fields should clarify that it doesn't work for intermediate joins
|Reported by:||andrewbadr||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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 (4)
comment:1 Changed 3 years ago by mattaustin
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to needsinfo
- Status changed from new to closed
- Type changed from Uncategorized to Bug
comment:3 Changed 2 years ago by jedediah
- Resolution needsinfo deleted
- Status changed from closed to new