Changes between Initial Version and Version 1 of Ticket #34597, comment 2
- Timestamp:
- May 28, 2023, 10:19:52 AM (19 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34597, comment 2
initial v1 118 118 I've managed to use your advice and modify the query to force the subquery to use IN but that leads to synthax that is more complex, while the django 2.2 synthax is a lot simpler: ~Q(translation=None) 119 119 120 The only synthax that manages to replicate the query correctly (and performance wise) seems to be121 {{{qs.exclude(id__in=Blog.objects.filter(translation=None, id=OuterRef("id")))}}} }120 The only synthax that manages (in django 3.2) to replicate the query correctly (and performance wise as in django2.2) seems to be 121 {{{qs.exclude(id__in=Blog.objects.filter(translation=None, id=OuterRef("id")))}}} 122 122 123 123 While not terrible I do think something has been broken in django since the ~Q(translation=None) seems a lot cleaner and more ORMish.