mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
EmptyQuerySet classes can now be merged with normal querysets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -781,5 +781,15 @@ Bug #7107 -- this shouldn't create an infinite loop.
|
||||
>>> Valid.objects.all()
|
||||
[]
|
||||
|
||||
Empty querysets can be merged with others.
|
||||
>>> Note.objects.none() | Note.objects.all()
|
||||
[<Note: n1>, <Note: n2>, <Note: n3>]
|
||||
>>> Note.objects.all() | Note.objects.none()
|
||||
[<Note: n1>, <Note: n2>, <Note: n3>]
|
||||
>>> Note.objects.none() & Note.objects.all()
|
||||
[]
|
||||
>>> Note.objects.all() & Note.objects.none()
|
||||
[]
|
||||
|
||||
"""}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user