mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
[1.7.x] Fixed #22429 -- Incorrect SQL when using ~Q and F
Backport of 5e1f4656b9 from master
This commit is contained in:
@@ -660,3 +660,18 @@ class Employment(models.Model):
|
||||
employer = models.ForeignKey(Company)
|
||||
employee = models.ForeignKey(Person)
|
||||
title = models.CharField(max_length=128)
|
||||
|
||||
|
||||
# Bug #22429
|
||||
|
||||
class School(models.Model):
|
||||
pass
|
||||
|
||||
|
||||
class Student(models.Model):
|
||||
school = models.ForeignKey(School)
|
||||
|
||||
|
||||
class Classroom(models.Model):
|
||||
school = models.ForeignKey(School)
|
||||
students = models.ManyToManyField(Student, related_name='classroom')
|
||||
|
||||
Reference in New Issue
Block a user