diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-18 10:33:37 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-18 10:33:37 +0000 |
| commit | 67cc3cec90c02201a27816552ed78b9ef7519927 (patch) | |
| tree | d39c9a52fbd1ce2701648c503f3fa69f0f7738e4 /tests | |
| parent | 670be13986b74f252d479ee2b7f74da8655273f6 (diff) | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/queries/models.py | 4 |
1 files 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') +[<Item: one>, <Item: two>, <Item: one>, <Item: two>, <Item: four>] # If we replace the default ordering, Django adjusts the required tables # automatically. Item normally requires a join with Note to do the default |
