#32511: Deferred fields incorrect when following prefetches back to the "parent"
object
-------------------------------------+-------------------------------------
Reporter: Jamie Matthews | Owner: Jamie
| Matthews
Type: Bug | Status: closed
Component: Database layer | Version: 3.1
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"f5233dce309543c826224be9dfa9c9f4f855f73c" f5233dce]:
{{{
#!CommitTicketReference repository=""
revision="f5233dce309543c826224be9dfa9c9f4f855f73c"
Fixed #32511 -- Corrected handling prefetched nested reverse
relationships.
When prefetching a set of child objects related to a set of parent
objects, we usually want to populate the relationship back from the
child to the parent to avoid a query when accessing that relationship
attribute. However, there's an edge case where the child queryset
itself specifies a prefetch back to the parent. In that case, we want
to use the prefetched relationship rather than populating the reverse
relationship from the parent.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32511#comment:5>
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/063.d39c212ad9a449757b2e8e518c2aaa15%40djangoproject.com.