#31207: Broken foreing key reference with multi-table inheritance (PostgreSQL,
Django 3.0)
-------------------------------------+-------------------------------------
Reporter: un.def | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* stage: Unreviewed => Accepted
Comment:
> So, my suggestions are as follows: ...
> 1. completely forbid to_field that points to field of parent non-
abstract model;
Makes sense to me, the logic will likely involve ensuring `to_field.model
== self.remote_field.model` in `ForeignObject.resolve_related_fields`
https://github.com/django/django/blob/5d654e1e7104d2ce86ec1b9fe52865a7dca4b4be/django/db/models/fields/related.py#L614-L615
--
Ticket URL: <https://code.djangoproject.com/ticket/31207#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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.ae0f5ba39201d247f7db19a43f6fde1b%40djangoproject.com.