Changes between Version 1 and Version 2 of Ticket #35677, comment 7


Ignore:
Timestamp:
Aug 15, 2024, 10:10:11 AM (3 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35677, comment 7

    v1 v2  
    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.
     1Thanks 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.
     2
     3I believe there are other tickets that discussed a generic way to alias such relationships so they are always reusable, it was brought up during the design of `FilteredRelation` for sure.
    24
    35IIRC the design was something along the lines of
Back to Top