#35434: prefetch_related_objects fails to cache UUID FKs when the string representation of a UUID is used -------------------------------------+------------------------------------- Reporter: Selcuk Ayguney | Owner: (none) Type: | Status: closed Cleanup/optimization | Component: Documentation | Version: dev Severity: Normal | Resolution: wontfix Keywords: | Triage Stage: | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Natalia Bidart):
* resolution: => wontfix * status: new => closed Comment: I have reviewed the PR and as mentioned there I'm not comfortable with the adding, I think it's misleading and could be interpreted it as a use case that Django supports when it does not. In my view, the example line doing `DailyEntry(day="2020-01-01", headline="Happy New Year!")` goes in direct opposition of [comment:10 what Simon said here]: > There's a difference between lookup against the database (e.g. `filter(pet_id=str(pet.id))`) which performs implicit conversions and direct model attribute assignments. I would argue that if you explicitly assign the string representation of objects meant to be stored in a field to a model instance you are effectively doing something wrong. -- Ticket URL: <https://code.djangoproject.com/ticket/35434#comment:15> 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/0107018f63f7a209-3ae7765b-d5a3-4e4c-bbb3-68c127ed4d4d-000000%40eu-central-1.amazonses.com.