#36614: Deprecate QuerySet.values_list(flat=True) with no fields
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Type:
| Cleanup/optimization
Status: new | Component: Database
| layer (models, ORM)
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
In #36606, this case was optimized, but it was also agreed we can
deprecate it. Using `values_list(flat=True)` doesn’t clearly declare which
fields to fetch, and while it happens to select the PK due to field
ordering, that’s unclear. It's also a bit counterintuitive, compared to
calls without `flat=True`, which select *all* fields.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36614>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.