Opened 9 years ago
Closed 9 years ago
#26310 closed Cleanup/optimization (fixed)
Document that a query's default ordering is unspecified
Reported by: | Wim Feijen | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
https://docs.djangoproject.com/en/1.9/ref/models/options/#ordering
Mistakenly, I was thinking that if no ordering was given on a Model's Meta, ordering is by "-id". I was foolishly mistaken. My proposal is to add to the documentation:
"If no ordering is given, results are returned from the database as is. Ordering might be anything, semi-randomly."
Change History (3)
comment:1 by , 9 years ago
Has patch: | set |
---|---|
Summary: | add to documentation that a Model's default ordering is semi-randomly → Document that a query's default ordering is unspecified |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
PR