mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #26551 -- Fixed negated Q() queries that span relations.
Prevented queries from reusing trimmed joins.
This commit is contained in:
parent
ad36e5480d
commit
e124d2da94
4 changed files with 26 additions and 4 deletions
|
@ -648,8 +648,6 @@ class Employment(models.Model):
|
|||
title = models.CharField(max_length=128)
|
||||
|
||||
|
||||
# Bug #22429
|
||||
|
||||
class School(models.Model):
|
||||
pass
|
||||
|
||||
|
@ -659,6 +657,8 @@ class Student(models.Model):
|
|||
|
||||
|
||||
class Classroom(models.Model):
|
||||
name = models.CharField(max_length=20)
|
||||
has_blackboard = models.NullBooleanField()
|
||||
school = models.ForeignKey(School, models.CASCADE)
|
||||
students = models.ManyToManyField(Student, related_name='classroom')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue