#35434: prefetch_related_objects fails to cache UUID FKs when the string representation of a UUID is used -------------------------------------+------------------------------------- Reporter: Selcuk Ayguney | Owner: Selcuk | Ayguney Type: Bug | Status: assigned Component: Database layer | Version: dev (models, ORM) | Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Jacob Walls):
* owner: nobody => Selcuk Ayguney * stage: Unreviewed => Accepted * status: new => assigned Comment: I ran into a symptom of this problem recently and didn't get far enough to diagnose the root cause. I was prefetching at two levels, so my [https://github.com/archesproject/arches/blob/3940c46627fb3dedbbe58cb64f892b517d86dc99/arches/app/utils/index_database.py#L220-L224 hack] was to just iterate the objects and reselect the object at the intermediate level (reintroducing N+1 queries at that level), but at least allowing me to avoid N+1 queries at the second level. Thanks for the report. -- Ticket URL: <https://code.djangoproject.com/ticket/35434#comment:4> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018f496d0031-35b6f9be-e94f-4afa-8443-9e673817fbc6-000000%40eu-central-1.amazonses.com.