#17485: Queries with both deferred fields and select_related defer field.name
instead of field.attname
-------------------------------------+-------------------------------------
Reporter: koniiiik | Owner: akaariai
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Release blocker | Triage Stage: Ready for
Keywords: defer | checkin
select_related | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by akaariai):
* stage: Accepted => Ready for checkin
Comment:
A fix for this is available from:
https://github.com/akaariai/django/tree/ticket_17485_fix
The problem was that for deeper nestings of select_related + only the
only() loaded fields were taken for self.query.model instead of the model
the field was located in. This managed to work correctly when
self.query.model was the same model as the field was in.
--
Ticket URL: <https://code.djangoproject.com/ticket/17485#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.