#29625: Expose RelatedManager._remove_prefetched_objects as public method
-------------------------------------+-------------------------------------
Reporter: Ming Qin | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: prefetch_related, | Triage Stage:
_prefetched_objects_cache | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
Not sure about the value of adding this. We already have
[https://docs.djangoproject.com/en/2.0/ref/models/instances#django.db.models.Model.refresh_from_db
`refresh_from_db()`] available.
A public `remove_prefetched_objects()` would be more fine-grained, yes,
but I'm not sure it would be worth the extra API surface area,
documentation and potential for user-confusion.
(''"Just use `refresh_from_db()`"'' is nice and clear.)
--
Ticket URL: <https://code.djangoproject.com/ticket/29625#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.6b22fdb1e70a45c7e8907cb159dc8748%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.