From 67cc3cec90c02201a27816552ed78b9ef7519927 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 18 Mar 2008 10:33:37 +0000 Subject: [PATCH] queryset-refactored: Added a test to show that ordering on multi-valued fields might not be what is expected. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7286 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/queries/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py index a9517628b4..08f55f4640 100644 --- a/tests/regressiontests/queries/models.py +++ b/tests/regressiontests/queries/models.py @@ -426,8 +426,8 @@ FieldError: Infinite loop caused by ordering. # Ordering by a many-valued attribute (e.g. a many-to-many or reverse # ForeignKey) is legal, but the results might not make sense. That isn't # Django's problem. Garbage in, garbage out. ->>> Item.objects.all().order_by('tags') -[...] +>>> Item.objects.all().order_by('tags', 'id') +[, , , , ] # If we replace the default ordering, Django adjusts the required tables # automatically. Item normally requires a join with Note to do the default