#20776: Multi-level Multi-table Inheritance - mismatched PKs / explicit
db_columns
-------------------------------------+-------------------------------------
Reporter: dowstreet@… | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.5
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: Muti-table | Patch needs improvement: 0
Inheritance | UI/UX: 0
Has patch: 0 |
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by dowstreet@…):
It looks like the problem occurs if a separate PK is defined in each child
class distinct from the OneToOneField pointing to the parent class. If
instead the OneToOneField is used as the PK in the child class then
everything seems to work. Maybe this is ok - i.e. one is a valid
configuration and one is not? We had initially configured a separate PK
in order to match a legacy database (but ended up changing that schema) -
not sure if there is a standard schema design for other (non-django)
software that uses similar class hierarchy.
--
Ticket URL: <https://code.djangoproject.com/ticket/20776#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/079.8f1c9d417940dc226853db78610aba1b%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.