mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #21554 -- Incorrect SQL generated when using multiple inheritance.
This commit is contained in:
parent
b63acdfe71
commit
38e24d680d
3 changed files with 35 additions and 7 deletions
|
@ -233,3 +233,17 @@ class User(models.Model):
|
|||
class Profile(User):
|
||||
profile_id = models.AutoField(primary_key=True)
|
||||
extra = models.CharField(max_length=30, blank=True)
|
||||
|
||||
|
||||
# Check concrete + concrete -> concrete -> concrete
|
||||
class Politician(models.Model):
|
||||
politician_id = models.AutoField(primary_key=True)
|
||||
title = models.CharField(max_length=50)
|
||||
|
||||
|
||||
class Congressman(Person, Politician):
|
||||
state = models.CharField(max_length=2)
|
||||
|
||||
|
||||
class Senator(Congressman):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue