1
0
mirror of https://github.com/django/django.git synced 2025-07-20 01:29:11 +00:00

[1.0.X] Fixed #9411 -- Changed the test from r9081 to be more robust across different database backends.

Backport of [9254] from trunk (I neglected to mention in the ticket this affected 1.0.X branch).

Also updated svnmerge metadata; all eligible fixes have been backported and all others blocked.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2008-10-24 18:13:35 +00:00
parent 71ae6cbfa4
commit d323ef20d3

View File

@ -974,11 +974,12 @@ about them and shouldn't do bad things.
>>> expected == result >>> expected == result
True True
Make sure bump_prefix() (an internal Query method) doesn't (re-)break. Make sure bump_prefix() (an internal Query method) doesn't (re-)break. It's
>>> query = Tag.objects.values_list('id').order_by().query sufficient that this query runs without error.
>>> query.bump_prefix() >>> qs = Tag.objects.values_list('id', flat=True).order_by('id')
>>> print query.as_sql()[0] >>> qs.query.bump_prefix()
SELECT U0."id" FROM "queries_tag" U0 >>> list(qs)
[1, 2, 3, 4, 5]
Calling order_by() with no parameters removes any existing ordering on the Calling order_by() with no parameters removes any existing ordering on the
model. But it should still be possible to add new ordering after that. model. But it should still be possible to add new ordering after that.