1
0
mirror of https://github.com/django/django.git synced 2025-07-05 02:09:13 +00:00

[soc2009/multidb] Merged upto trunk r10941

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor 2009-06-07 23:42:26 +00:00
parent 110e4f68ef
commit f57bc92842

View File

@ -1151,6 +1151,7 @@ True
>>> qs = Author.objects.filter(pk__in=subq) >>> qs = Author.objects.filter(pk__in=subq)
>>> list(qs) >>> list(qs)
[<Author: a1>, <Author: a2>] [<Author: a1>, <Author: a2>]
# The subquery result cache should not be populated # The subquery result cache should not be populated
>>> subq._result_cache is None >>> subq._result_cache is None
True True
@ -1159,6 +1160,7 @@ True
>>> qs = Author.objects.exclude(pk__in=subq) >>> qs = Author.objects.exclude(pk__in=subq)
>>> list(qs) >>> list(qs)
[<Author: a3>, <Author: a4>] [<Author: a3>, <Author: a4>]
# The subquery result cache should not be populated # The subquery result cache should not be populated
>>> subq._result_cache is None >>> subq._result_cache is None
True True
@ -1166,6 +1168,7 @@ True
>>> subq = Author.objects.filter(num__lt=3000) >>> subq = Author.objects.filter(num__lt=3000)
>>> list(Author.objects.filter(Q(pk__in=subq) & Q(name='a1'))) >>> list(Author.objects.filter(Q(pk__in=subq) & Q(name='a1')))
[<Author: a1>] [<Author: a1>]
# The subquery result cache should not be populated # The subquery result cache should not be populated
>>> subq._result_cache is None >>> subq._result_cache is None
True True