Changes between Initial Version and Version 1 of Ticket #35677, comment 7
- Timestamp:
- Aug 15, 2024, 10:09:38 AM (4 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35677, comment 7
initial v1 1 Thanks Natalia, #27303 is effectively a manifestation of this problem in the admin. We don't have a good way to denote that joins against multi-valued relationships should be reused between different `QuerySet` method calls. It's a problem we hacked around for `filter` with this ''sticky'' notion but the problem exists for `annotate` and any other ORM method that allows for multi-valued (many-to-many or reverse one-to-many) . I believe there are other tickets that discussed a generic way to alias such relationships so they are always reusable, I know it was brought up during the design of `FilteredRelation` for sure.1 Thanks Natalia, #27303 is effectively a manifestation of this problem in the admin. We don't have a good way to denote that joins against multi-valued relationships should be reused between different `QuerySet` method calls. It's a problem we hacked around for `filter` with this ''sticky'' notion but the problem exists for `annotate` and any other ORM method that allows for multi-valued (many-to-many or reverse one-to-many) to be referenced. I believe there are other tickets that discussed a generic way to alias such relationships so they are always reusable, I know it was brought up during the design of `FilteredRelation` for sure. 2 2 3 3 IIRC the design was something along the lines of