#23270: select_related on fields pointing to subclasses does not work when using
defer
-------------------------------------+-------------------------------------
Reporter: islavov | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer | Version: 1.7-rc-2
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: select_related | Needs documentation: 1
defer | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 1 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by Vladimiroff):
The reason behind this is that `subclassa` (in the given example) is not
technically a **field**. Which means it won't be returned by
`Base._meta.get_concrete_fields_with_model`. The only solution I could
think of is creating `get_all_concrete_fields_with_model` (which should
use `get_all_field_names` instead of `local_fields`).
Anyone with better ideas?
--
Ticket URL: <https://code.djangoproject.com/ticket/23270#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/065.4a96ba18a40d42a47add99ac2d438103%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.