#36183: Model o2o inheritance with abstract models does not "evaluate" a lazy
relationship
-------------------------------------+-------------------------------------
Reporter: BeryCZ | Owner: (none)
Type: Bug | Status: new
Component: Database layer | Version: 5.1
(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
-------------------------------------+-------------------------------------
Comment (by BeryCZ):
As described in comment:3 you can already work around this case by
ensuring that your abstract base inherits from the base you are referring
to in your parent link. To me your position in comment:5 is more
ideological than practical as lazy relationships are designed to help with
circular references and references to swappable models not to obscure
coupling issues between abstract and concrete entities of your projects.
It's not ideological, it's practical. I'm working on a new cms. We have
built over 300 projects on our old cms in the past ~23years. The old cms
is completely custom, no framework and it's getting kinda "outdated", so
we need a new one. Based on experience I'm expecting few hundereds of
projects each containing ~1-10 page types. And putting the base model into
the reusable app and never be able to add a project-specific field would
be a very bad design.
I suppose it's not an easy-to-fix bug and ofc I understand that you're
busy, but imo it's better to leave this ticket open as "accepted - PR
welcome", even long-term, than hiding it.
I don't need it fixed right away since there is the workaround by defining
parent_link on the concrete submodels. So either I get to it, or you, or
whoever else will need it, or whoever will first have the time :) but it's
better to leave it open for now.
Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/36183#comment:14>
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 visit
https://groups.google.com/d/msgid/django-updates/010701953b74033a-825fe584-dfc8-41df-b7c9-f0dd3495c426-000000%40eu-central-1.amazonses.com.