From 76ac07a90967acb0225d0a590164ae1b7ad0e6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anssi=20K=C3=A4=C3=A4ri=C3=A4inen?= Date: Mon, 13 Jul 2015 10:54:39 +0300 Subject: [PATCH] Refs #24090 -- Added a test for multi-table inheritance + subqueries. Ticket #24090 was already fixed by b68212f539f206679580afbfd008e7d329c9cd31, this commit adds tests to verify this is indeed the case. Thanks to Beauhurst for commissioning the work on this ticket. --- tests/queries/models.py | 6 +++++- tests/queries/tests.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/queries/models.py b/tests/queries/models.py index 5d63ae9ea8d..26d3cf46277 100644 --- a/tests/queries/models.py +++ b/tests/queries/models.py @@ -700,7 +700,11 @@ class Classroom(models.Model): students = models.ManyToManyField(Student, related_name='classroom') -class Ticket23605A(models.Model): +class Ticket23605AParent(models.Model): + pass + + +class Ticket23605A(Ticket23605AParent): pass diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 893ed1e8622..36579937f44 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -3657,6 +3657,7 @@ class Ticket23605Tests(TestCase): # The query structure is such that we have multiple nested subqueries. # The original problem was that the inner queries weren't relabeled # correctly. + # See also #24090. a1 = Ticket23605A.objects.create() a2 = Ticket23605A.objects.create() c1 = Ticket23605C.objects.create(field_c0=10000.0)