mirror of https://github.com/django/django.git
Refs #31614 -- Added test for ordering by OrderBy() of combined queryset with not selected columns.
This commit is contained in:
parent
587b179d41
commit
f4bab0982a
|
@ -268,6 +268,8 @@ class QuerySetSetOperationTests(TestCase):
|
||||||
list(qs1.union(qs2).order_by('num'))
|
list(qs1.union(qs2).order_by('num'))
|
||||||
with self.assertRaisesMessage(DatabaseError, msg):
|
with self.assertRaisesMessage(DatabaseError, msg):
|
||||||
list(qs1.union(qs2).order_by(F('num')))
|
list(qs1.union(qs2).order_by(F('num')))
|
||||||
|
with self.assertRaisesMessage(DatabaseError, msg):
|
||||||
|
list(qs1.union(qs2).order_by(F('num').desc()))
|
||||||
# switched order, now 'exists' again:
|
# switched order, now 'exists' again:
|
||||||
list(qs2.union(qs1).order_by('num'))
|
list(qs2.union(qs1).order_by('num'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue