#9358: .dates(...) only spitting out a single date, bug in queryset order
---------------------------------------------------+------------------------
Reporter: dokterbob | Owner:
mtredinnick
Status: assigned | Milestone: post-1.0
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords: dates
order .dates sqlite
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by mtredinnick):
The point is that I don't want to have code that does things way for
SQLite and some other way for other databases. The ordering and column
selections pieces of the query construction are relatively separated and
having to put part of the ordering construction into the `db/backends/*`
part of the code is a bit fugly.
Fortunately, we can avoid it. As you note, we can use a named alias for
the output column gets around this, so I'll add that into the query. That
will also avoid a problem with "order by 1" problems that we've seen on
older SQLites on Windows (particularly the SQLite shipped with the Python
2.5 binary).
Short version: no need to worry about an SQLite-specific workaround.
Assuming the aliased query actually works on SQLite (does it?), I'm going
to take that approach.
--
Ticket URL: <http://code.djangoproject.com/ticket/9358#comment:5>
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
-~----------~----~----~----~------~----~------~--~---