#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
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

 > I understand where that could be perceived as inconsistent but I would
 argue that it's undefined behaviour in both cases. It only happens to work
 in the lazy loading case because it incurs a query that defers the lookup
 to the backend.

 Interesting. If `pet_id=str(pet.id)` is undefined, then I'm looking at a
 huge yak shave to audit my projects for UUIDs represented as strings,
 which I'm pretty sure we're doing in every view, test, model, migration...
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35434#comment:9>
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/0107018f49dd59d7-9963bae5-c75c-4ec7-b934-d9fedaa8b275-000000%40eu-central-1.amazonses.com.

Reply via email to