Changes between Initial Version and Version 1 of Ticket #23774
- Timestamp:
- Nov 6, 2014, 12:21:04 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23774
- Property Summary Documentation on ordering by ForeignKey fields is incorrect → Documentation on ordering by ForeignKey fields is misleading
-
Ticket #23774 – Description
initial v1 9 9 10 10 11 But this is incorrect.11 But this is misleading, and should probably show ordering by the related model's ordering. 12 12 13 13 14 When ordering by a `ForeignKey`, the related model's default ordering will be used. For example, consider:14 A quick example that might be more instructive:: 15 15 16 16 {{{ … … 33 33 INNER JOIN "django_testproj_widgettype" ON ( "django_testproj_widget"."type_id" = "django_testproj_widgettype"."id" ) 34 34 ORDER BY "django_testproj_widgettype"."label" ASC 35 >>> django.VERSION36 (1, 7, 1, 'final', 0)37 35 }}} 38 36 37 38 **Edit** I can't read and totally missed the "or order by the related model’s primary key if there is no Meta.ordering specified" each time I read the documentation. I'll leave the ticket standing as I'm probably not the only one to hit this?