[1.8.x] Fixed #28561 -- Removed inaccurate docs about QuerySet.order_by() and joins.

As of ccbba98131, both examples don't use
a join.

Backport of 44a6c27fd4 from master
This commit is contained in:
Tim Graham 2017-09-06 19:21:38 -04:00
parent 5e5c056e0e
commit e3cf8d2e94
1 changed files with 0 additions and 14 deletions

View File

@ -320,20 +320,6 @@ identical to::
Entry.objects.order_by('blog__name')
It is also possible to order a queryset by a related field, without incurring
the cost of a JOIN, by referring to the ``_id`` of the related field::
# No Join
Entry.objects.order_by('blog_id')
# Join
Entry.objects.order_by('blog__id')
.. versionadded:: 1.7
The ability to order a queryset by a related field, without incurring
the cost of a JOIN was added.
You can also order by :doc:`query expressions </ref/models/expressions>` by
calling ``asc()`` or ``desc()`` on the expression::