#28422: Allow adding joins to other querysets (or models) to a queryset with 
extra
join conditions
-------------------------------------+-------------------------------------
     Reporter:  Debanshu Kundu       |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  1.11
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Chris Connelly):

 I was actually in the process of writing a similar ticket when this one
 popped up! As with what Debanshu Kundu stated above, my goal was to add a
 join to a subquery. My solution was a lot lower fidelity - I used
 `QuerySet.extra` to inject a placeholder table (e.g. `{{JOIN}}`) which I
 then substituted with the generated subquery before execution.

 This does seem like this could be done if
 https://github.com/django/django/pull/8238 was merged, which is an
 offshoot of #27332.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28422#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.54eb514ff074f4f6244ffdb5c4111fd0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to