mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #10733 -- select_related().only() failure
The bug was reported pre 1.1, and somewhere along the way it has been fixed. So, this is tests only addition.
This commit is contained in:
parent
32e40bbe71
commit
8d4b1629d4
2 changed files with 35 additions and 1 deletions
|
@ -108,3 +108,21 @@ class Hen(Fowl):
|
|||
|
||||
class Chick(Fowl):
|
||||
mother = models.ForeignKey(Hen)
|
||||
|
||||
class Base(models.Model):
|
||||
name = models.CharField(max_length=10)
|
||||
lots_of_text = models.TextField()
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
class A(Base):
|
||||
a_field = models.CharField(max_length=10)
|
||||
|
||||
class B(Base):
|
||||
b_field = models.CharField(max_length=10)
|
||||
|
||||
class C(Base):
|
||||
c_a = models.ForeignKey(A)
|
||||
c_b = models.ForeignKey(B)
|
||||
is_published = models.BooleanField()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue