#24421: Querying a reverse ForeignObject relation using exclude() fails
-------------------------------------+-------------------------------------
     Reporter:  animan1              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  ForeignObject,       |             Triage Stage:  Accepted
  MySQL, SQLite                      |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by akaariai):

 We don't have the smarts to handle exclude() queries for multicolumn joins
 just yet in Django. Fixing this requires changing Django to use EXISTS
 queries, as not all backends support multicolumn IN clauses of the form
 (WHERE col1, col2 IN (SELECT innercol1, innercol2 FROM ...).

 We have other reasons to prefer EXISTS queries, too.  For one, PostgreSQL
 performs very badly with NOT IN queries.

 Unfortunately fixing this properly will likely require multiple days of
 work.

--
Ticket URL: <https://code.djangoproject.com/ticket/24421#comment:4>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.7023898ab0e1d41cb8c1dbaf2e51075c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to