Changes between Initial Version and Version 1 of Ticket #35437, comment 2
- Timestamp:
- May 6, 2024, 6:45:42 PM (7 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35437, comment 2
initial v1 39 39 q.add_annotation(Value(1), "a") 40 40 }}} 41 42 This appears to be a misuse of `EXISTS` here. You want to a subquery directly I suppose to achieve your purpose. 43 44 {{{#!python 45 Employee.objects.filter( 46 id__in=Employee.objects.filter( 47 manager=OuterRef("manager") 48 ).order_by("-salary").values("id") 49 ) 50 }}}