#9208: latest() does not behave as expected for equal timestamps
---------------------------------------------------+------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: closed | Milestone: post-1.0
Component: Database layer (models, ORM) | Version: SVN
Resolution: wontfix | Keywords: latest
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by russellm):
* status: new => closed
* needs_better_patch: => 0
* resolution: => wontfix
* needs_tests: => 0
* needs_docs: => 0
Comment:
You're assuming that IDs will be handed out sequentially. This isn't
always going to be a valid assumption. On most databases with a small
amount of data, it will be fine, but on certain databases, larger
installs, or installs with lots of data that is getting deleted, it's
becomes less tenable.
In short, ordering by id is a fallback because we have to have to have a
field that we know will exist. It's not really something that should be
optimized. If you _really_ need to rely on the ordering of objects that
occur on the same date, you need to add something to your model that
represents that order and doesn't have any ambiguity.
On a procedural note: patch with no tests == "Here are some bugs we think
you should have". A patch without tests isn't going to get much attention.
--
Ticket URL: <http://code.djangoproject.com/ticket/9208#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---