mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Refs #27149 -- Moved subquery expression resolving to Query.
This makes Subquery a thin wrapper over Query and makes sure it respects the Expression source expression API by accepting the same number of expressions as it returns. Refs #30188. It also makes OuterRef usable in Query without Subquery wrapping. This should allow Query's internals to more easily perform subquery push downs during split_exclude(). Refs #21703.
This commit is contained in:
parent
96b6ad94d9
commit
3543129822
4 changed files with 52 additions and 57 deletions
|
@ -402,7 +402,7 @@ class Queries1Tests(TestCase):
|
|||
|
||||
def test_avoid_infinite_loop_on_too_many_subqueries(self):
|
||||
x = Tag.objects.filter(pk=1)
|
||||
local_recursion_limit = 127
|
||||
local_recursion_limit = 67
|
||||
msg = 'Maximum recursion depth exceeded: too many subqueries.'
|
||||
with self.assertRaisesMessage(RuntimeError, msg):
|
||||
for i in range(local_recursion_limit * 2):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue