filter() on a related multi-valued manager joins to too many tables.
|Reported by:||mtredinnick||Owned by:||mtredinnick|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Because related managers are treated as filter() calls internally, filtering on a related attribute is the same as chained filter() calls, which leads to unintuitive behaviour on many-to-many relations and reverse ForeignKey relations.
Change History (6)
comment:1 Changed 8 years ago by mtredinnick
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:5 Changed 7 years ago by mtredinnick
- Resolution set to fixed
- Status changed from new to closed