Changes between Initial Version and Version 1 of Ticket #25789, comment 2


Ignore:
Timestamp:
Nov 23, 2015, 1:01:45 PM (9 years ago)
Author:
Tim Graham

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25789, comment 2

    initial v1  
    33Unfortunately this is hard to implement correctly. The big problem is aggregation, when doing .filter().annotate(), where both operations target the same relation, the aggregation must use results of the join generated by the filter. But if the filter doesn't generate a join, then we have a problem.
    44
    5 It would be Djangoic if the exists query would be generated automatically. For the above mentioned reason this is hard. Maybe it would be easier if we had something like .filter(models.Exists(somerel__col=val)), where the Exists() class would inform Django that an exists subquery should be generated.
     5It would be Djangoic if the exists query would be generated automatically. For the above mentioned reason this is hard. Maybe it would be easier if we had something like `.filter(models.Exists(somerel__col=val))`, where the `Exists()` class would inform Django that an exists subquery should be generated.
Back to Top