Changes between Initial Version and Version 1 of Ticket #25789, comment 2
- Timestamp:
- Nov 23, 2015, 1:01:45 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25789, comment 2
initial v1 3 3 Unfortunately 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. 4 4 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.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.