#18012: Propagate reverse foreign keys from proxy models to base class
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: charettes
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: 1.4
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by carljm):
ISTM that by far the most intuitive API for "I want to get a proxy object
back from following this relationship" is to simply point the FK at the
proxy class instead of the base class, like you do now. Any other API
feels hacky to me by comparison, and is one more new thing (without
parallel elsewhere) that people have to learn.
I don't really see that anyone has yet provided a strong motivation for
this ticket; the current behavior seems fine and right to me. It seems to
me that this ticket is mostly a result of seeking too much equivalence
between the DB schema and the models API.
That said, I'm not strongly opposed to making the reverse descriptor
available on the base class too, it just seems a bit odd to me.
I am strongly opposed to deprecating FKs to proxy classes and replacing
them with a new API that people have to learn to get a proxy instance back
from an FK.
--
Ticket URL: <https://code.djangoproject.com/ticket/18012#comment:11>
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/066.4f8c4afec63b4cbff51625a98a4a575f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.