summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-03-03 10:15:24 -0500
committerTim Graham <timograham@gmail.com>2016-03-03 17:54:07 -0500
commitc0181f2c1f982d27cdcea2ed293aa34a3ecf7d8b (patch)
tree37466b0bdd7ea510406a1b29b675bf49f61ae0f9 /docs
parent4e2da368dbad53205bec81b7bd74df63397716ad (diff)
Fixed #26310 -- Documented that a queryset ordering must be specified to ensure ordered results.
Thanks Simon Charette for review.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/options.txt6
-rw-r--r--docs/ref/models/querysets.txt6
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
index 8fbf4b219e..e047a01f10 100644
--- a/docs/ref/models/options.txt
+++ b/docs/ref/models/options.txt
@@ -288,6 +288,12 @@ Django quotes column and table names behind the scenes.
incurs a cost to your database. Each foreign key you add will
implicitly include all of its default orderings as well.
+ If a query doesn't have an ordering specified, results are returned from
+ the database in an unspecified order. A particular ordering is guaranteed
+ only when ordering by a set of fields that uniquely identify each object in
+ the results. For example, if a ``name`` field isn't unique, ordering by it
+ won't guarantee objects with the same name always appear in the same order.
+
``permissions``
---------------
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index b632434456..d60b3a5866 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -387,6 +387,12 @@ query will be ordered by ``pub_date`` and not ``headline``::
incurs a cost to your database. Each foreign key you add will
implicitly include all of its default orderings as well.
+ If a query doesn't have an ordering specified, results are returned from
+ the database in an unspecified order. A particular ordering is guaranteed
+ only when ordering by a set of fields that uniquely identify each object in
+ the results. For example, if a ``name`` field isn't unique, ordering by it
+ won't guarantee objects with the same name always appear in the same order.
+
``reverse()``
~~~~~~~~~~~~~