[Django] #31953: Model Inheritance and reverse relations

10 views
Skip to first unread message

Django

unread,
Aug 27, 2020, 6:51:14 AM8/27/20
to django-...@googlegroups.com
#31953: Model Inheritance and reverse relations
---------------------------------------------+------------------------
Reporter: Yash Jhunjhunwala | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
Given the following structure

{{{
class ModelA(models.Model):
pass

class ModelB(ModelA):
pass

class ModelC(models.Model):
model_a=models.OnetoOneField(ModelA)

class ModelD(ModelC):
pass
}}}

This works
{{{
modelA.modelc
}}}

This works too
{{{
modelB.modelc
}}}


Is there a way to do:
{{{
modelB.modeld
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31953>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 27, 2020, 6:56:10 AM8/27/20
to django-...@googlegroups.com
#31953: Model Inheritance and reverse relations
-------------------------------------+-------------------------------------

Reporter: Yash Jhunjhunwala | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => invalid
* component: Uncategorized => Database layer (models, ORM)


Comment:

Please don't use Trac as a support channel. Closing per
TicketClosingReasons/UseSupportChannels.

--
Ticket URL: <https://code.djangoproject.com/ticket/31953#comment:1>

Reply all
Reply to author
Forward
0 new messages