#31580: Union queryset should raise on distinct().
-------------------------------------+-------------------------------------
     Reporter:  Sielc Technologies   |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  orm, distinct,       |             Triage Stage:  Accepted
  annotate, union                    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * cc: Hasan Ramezani (added)
 * version:  3.0 => master
 * easy:  0 => 1
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 `distinct()` is not supported but doesn't raise an error yet. As
 ‚Äč[https://docs.djangoproject.com/en/stable/ref/models/querysets/#union per
 the documentation], ''"only LIMIT, OFFSET, COUNT(*), ORDER BY, and
 specifying columns (i.e. slicing, count(), order_by(), and
 values()/values_list()) are allowed on the resulting QuerySet."''.

 Follow up to #27995.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31580#comment:2>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.3ac605d4303229acc3c80caa8f7ee4a5%40djangoproject.com.

Reply via email to