Changes between Initial Version and Version 1 of Ticket #25113, comment 6
- Timestamp:
- Oct 5, 2019, 5:11:32 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25113, comment 6
initial v1 1 1 It produce SQL like: 2 2 {{{ 3 NOT ("jobs_job"."id" IN (SELECT U0." id" FROM "jobs_jobstatus" U0))3 NOT ("jobs_job"."id" IN (SELECT U0."job_id" FROM "jobs_jobstatus" U0)) 4 4 }}} 5 5 … … 7 7 8 8 {{{ 9 "jobs_job"."id" NOT IN (SELECT U0." id" FROM "jobs_jobstatus" U0)9 "jobs_job"."id" NOT IN (SELECT U0."job_id" FROM "jobs_jobstatus" U0) 10 10 }}} 11 11 … … 16 16 {{{ 17 17 Job.objects.filter( 18 ~Q(id__in=JobStatus.objects.values_list(' id', flat=True).all()),18 ~Q(id__in=JobStatus.objects.values_list('job_id', flat=True).all()), 19 19 ... 20 20 ) … … 24 24 25 25 {{{ 26 Job.objects.filter(...).exclude(id__in=JobStatus.objects.values_list(' id', flat=True).all()).delete()26 Job.objects.filter(...).exclude(id__in=JobStatus.objects.values_list('job_id', flat=True).all()).delete() 27 27 }}}