diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-19 13:06:45 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-12-19 13:06:45 +0000 |
| commit | 7292cc8d60f9e993c26755456468cfd4cd8eb03e (patch) | |
| tree | bbd9f6b9e8c256ac1c0b4c34b453833e8ac06872 /tests/regressiontests | |
| parent | 4dc766c9e1912dd0858c8ef80197fe2a3bb1ec92 (diff) | |
queryset-refactor: Reverted [6762] because it generates invalid SQL. It only worked accidentally with SQLite.
Refs #4002.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/queries/models.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py index e7e78e23cd..0404e9f9be 100644 --- a/tests/regressiontests/queries/models.py +++ b/tests/regressiontests/queries/models.py @@ -458,19 +458,11 @@ thus fail.) >>> Item.objects.extra(select=SortedDict(s), params=params).values('a','b')[0] {'a': u'one', 'b': u'two'} -Bug #4002 -Attributes used in extra(select=...) are available for use in subsequent -order_by() and filter() calls. - # Order by the number of tags attached to an item. >>> l = Item.objects.extra(select={'count': 'select count(*) from queries_item_tags where queries_item_tags.item_id = queries_item.id'}).order_by('-count') >>> [o.count for o in l] [2, 2, 1, 0] -# Filter those items that have exactly one tag attached. ->>> Item.objects.extra(select={'count': 'select count(*) from queries_item_tags where queries_item_tags.item_id = queries_item.id'}).filter(count=1) -[<Item: four>] - Bug #6154 Multiple filter statements are joined using "AND" all the time. |
