mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #29932 -- Fixed combining compound queries with sub-compound queries on SQLite and Oracle.
This commit is contained in:
committed by
Tim Graham
parent
ae180fa4b7
commit
f9a33e3c3f
@@ -214,3 +214,9 @@ class QuerySetSetOperationTests(TestCase):
|
||||
list(qs1.union(qs2).order_by('num'))
|
||||
# switched order, now 'exists' again:
|
||||
list(qs2.union(qs1).order_by('num'))
|
||||
|
||||
@skipUnlessDBFeature('supports_select_difference', 'supports_select_intersection')
|
||||
def test_qs_with_subcompound_qs(self):
|
||||
qs1 = Number.objects.all()
|
||||
qs2 = Number.objects.intersection(Number.objects.filter(num__gt=1))
|
||||
self.assertEqual(qs1.difference(qs2).count(), 2)
|
||||
|
||||
Reference in New Issue
Block a user