summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2017-07-14 18:11:29 +0200
committerTim Graham <timograham@gmail.com>2017-07-15 08:20:12 -0400
commitadab280cefb15659c39558ac26ea392b0a1e456c (patch)
treed25014600368259ebbe806dd677530bda72cae5e /docs
parent9290f15bb525c7c0d2d06bee055d177ec947a1f6 (diff)
Fixed #28399 -- Fixed QuerySet.count() for union(), difference(), and intersection() queries.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/querysets.txt14
-rw-r--r--docs/releases/1.11.4.txt3
2 files changed, 12 insertions, 5 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 8cdf32b247..2c1f68fc06 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -821,11 +821,15 @@ of other models. Passing different models works as long as the ``SELECT`` list
is the same in all ``QuerySet``\s (at least the types, the names don't matter
as long as the types in the same order).
-In addition, only ``LIMIT``, ``OFFSET``, and ``ORDER BY`` (i.e. slicing and
-:meth:`order_by`) are allowed on the resulting ``QuerySet``. Further, databases
-place restrictions on what operations are allowed in the combined queries. For
-example, most databases don't allow ``LIMIT`` or ``OFFSET`` in the combined
-queries.
+In addition, only ``LIMIT``, ``OFFSET``, ``COUNT(*)``, and ``ORDER BY`` (i.e.
+slicing, :meth:`count`, and :meth:`order_by`) are allowed on the resulting
+``QuerySet``. Further, databases place restrictions on what operations are
+allowed in the combined queries. For example, most databases don't allow
+``LIMIT`` or ``OFFSET`` in the combined queries.
+
+.. versionchanged:: 1.11.4
+
+ ``COUNT(*)`` support was added.
``intersection()``
~~~~~~~~~~~~~~~~~~
diff --git a/docs/releases/1.11.4.txt b/docs/releases/1.11.4.txt
index c64f5c9c6f..8952ce1c4b 100644
--- a/docs/releases/1.11.4.txt
+++ b/docs/releases/1.11.4.txt
@@ -25,3 +25,6 @@ Bugfixes
* Corrected ``Field.has_changed()`` to return ``False`` for disabled form
fields: ``BooleanField``, ``MultipleChoiceField``, ``MultiValueField``,
``FileField``, ``ModelChoiceField``, and ``ModelMultipleChoiceField``.
+
+* Fixed ``QuerySet.count()`` for ``union()``, ``difference()``, and
+ ``intersection()`` queries. (:ticket:`28399`).