mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #23605 -- Fixed nested subquery regression
Added relabeled_clone() method to sql.Query to fix the problem. It manifested itself in rare cases where at least double nested subquery's filter condition might target non-existing alias. Thanks to Trac alias ris for reporting the problem.
This commit is contained in:
parent
21e21c7bc2
commit
5c481db295
5 changed files with 77 additions and 3 deletions
|
@ -698,3 +698,18 @@ class Student(models.Model):
|
|||
class Classroom(models.Model):
|
||||
school = models.ForeignKey(School)
|
||||
students = models.ManyToManyField(Student, related_name='classroom')
|
||||
|
||||
|
||||
class Ticket23605A(models.Model):
|
||||
pass
|
||||
|
||||
|
||||
class Ticket23605B(models.Model):
|
||||
modela_fk = models.ForeignKey(Ticket23605A)
|
||||
modelc_fk = models.ForeignKey("Ticket23605C")
|
||||
field_b0 = models.IntegerField(null=True)
|
||||
field_b1 = models.BooleanField(default=False)
|
||||
|
||||
|
||||
class Ticket23605C(models.Model):
|
||||
field_c0 = models.FloatField()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue