1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
django/docs/ref/models
Simon Charette 65ad4ade74 Refs #28900 -- Made SELECT respect the order specified by values(*selected).
Previously the order was always extra_fields + model_fields + annotations with
respective local ordering inferred from the insertion order of *selected.

This commits introduces a new `Query.selected` propery that keeps tracks of the
global select order as specified by on values assignment. This is crucial
feature to allow the combination of queries mixing annotations and table
references.

It also allows the removal of the re-ordering shenanigans perform by
ValuesListIterable in order to re-map the tuples returned from the database
backend to the order specified by values_list() as they'll be in the right
order at query compilation time.

Refs #28553 as the initially reported issue that was only partially fixed
for annotations by d6b6e5d0fd.

Thanks Mariusz Felisiak and Sarah Boyce for review.
2024-07-03 16:36:25 +02:00
..
class.txt Fixed #34140 -- Reformatted code blocks in docs with blacken-docs. 2023-03-01 13:03:56 +01:00
conditional-expressions.txt Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices. 2023-08-30 22:57:40 -03:00
constraints.txt Removed versionadded/changed annotations for 5.0. 2024-05-22 15:44:07 -03:00
database-functions.txt Removed versionadded/changed annotations for 5.0. 2024-05-22 15:44:07 -03:00
expressions.txt Removed versionadded/changed annotations for 5.0. 2024-05-22 15:44:07 -03:00
fields.txt Fixed #24076 -- Added warnings on usage of dates with DateTimeField and datetimes with DateField. 2024-05-23 12:03:57 +02:00
index.txt
indexes.txt Fixed #34761 -- Dropped support for MySQL < 8.0.11. 2023-08-03 18:54:29 +02:00
instances.txt Made cosmetic edits to code snippets reformatted with blacken-docs. 2024-05-30 09:42:05 -03:00
lookups.txt Refs #22936 -- Doc'd Lookup.prepare_rhs. 2023-10-05 15:26:02 +02:00
meta.txt Fixed #28011 -- Corrected Field.hidden docs. 2024-02-17 17:17:23 +01:00
options.txt Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition. 2024-03-01 07:15:32 +01:00
querysets.txt Refs #28900 -- Made SELECT respect the order specified by values(*selected). 2024-07-03 16:36:25 +02:00
relations.txt Removed versionadded/changed annotations for 4.2. 2023-09-18 22:12:40 +02:00