Add a way to clear select_related
|Reported by:||Carl Meyer||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||jdunck@…, seldon, botondus@…, timograham@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If you've got a queryset that has had select_related called on it (maybe passed to you from some other code you don't control) there's currently no documented way to clear out select_related.
One possible API is .select_related(None), which mirrors how .defer() works.
The combination of this and #16855 would make .select_related() and .defer() more consistent with each other, which would be nice.