summaryrefslogtreecommitdiff
path: root/docs/db-api.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/db-api.txt')
-rw-r--r--docs/db-api.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt
index 74adc10457..3cab6574ea 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -541,6 +541,13 @@ primary key if there is no ``Meta.ordering`` specified. For example::
...since the ``Blog`` model has no default ordering specified.
+You can only order by model fields that have a single value attached to them
+for each instance of the model. For example, non-relations, ``ForeignKey`` and
+``OneToOneField`` fields. Explicitly, you can't order by a ``ManyToManyField``
+or a reverse ``ForeignKey`` relation. There's no naturally correct ordering
+for many-valued fields and a lot of the alternatives are not psosible to
+express in SQL very efficiently.
+
**New in Django development version:** If you don't want any ordering to be
applied to a query, not even the default ordering, call ``order_by()`` with no
parameters.