summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-03-11 08:23:51 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-03-11 08:23:51 +0000
commitf3ed30f377051c3fef3d184241ed5271fbe61854 (patch)
tree9002ad05abfcd6add32b54318a750674bfd9a588 /tests
parent3176bebffd7a7e3ba131da2d1b3f9776e159f0a8 (diff)
queryset-refactor: Infinite loop detection in model ordering was being a little
too aggressive. Fixed that. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/queries/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index 17476217cd..7185558f45 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -407,6 +407,11 @@ Traceback (most recent call last):
...
FieldError: Infinite loop caused by ordering.
+# ... but you can still order in a non-recursive fashion amongst linked fields
+# (the previous test failed because the default ordering was recursive).
+>>> LoopX.objects.all().order_by('y__x__id')
+[]
+
# If the remote model does not have a default ordering, we order by its 'id'
# field.
>>> Item.objects.order_by('creator', 'name')