#33008: Document prefetch_related for GenericForeignKey - Object doesn't exist
behaviour
--------------------------------------+------------------------------------
Reporter: Martin Svoboda | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.contenttypes | Version: 3.2
Severity: Normal | Resolution:
Keywords: Documentation | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Martin Svoboda):
Thank you, your recommendation actually fix the problem. I propose the
patch https://github.com/django/django/pull/14762
I found one problem with the solution. prefetch_related sets
tag.content_object to None, but access to this tag.content_object actually
cause extra lookup query.
--
Ticket URL: <https://code.djangoproject.com/ticket/33008#comment:6>
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/071.7e28077924f57d81a376fedb3d320426%40djangoproject.com.