<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/tests/queries/test_qs_combinators.py, branch main</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=main</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2026-02-12T20:27:33Z</updated>
<entry>
<title>Added tests for QuerySet.union() across different models and value aliases.</title>
<updated>2026-02-12T20:27:33Z</updated>
<author>
<name>Emanuel Lupi</name>
<email>emanuel.lupi91@gmail.com</email>
</author>
<published>2024-09-07T15:57:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=8d2a925a0e0bc6d1161ab41ad35f8422c549cada'/>
<id>urn:sha1:8d2a925a0e0bc6d1161ab41ad35f8422c549cada</id>
<content type='text'>
These tests were developed during work on MongoDB and capture edge cases
discovered there.
</content>
</entry>
<entry>
<title>Refs #36644 -- Applied default ordering after union().</title>
<updated>2026-02-06T20:45:45Z</updated>
<author>
<name>Nilesh Kumar Pahari</name>
<email>nileshpahari@protonmail.com</email>
</author>
<published>2026-02-05T22:21:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=087bb9e8f3478d53f12b1737af865992af17c5f2'/>
<id>urn:sha1:087bb9e8f3478d53f12b1737af865992af17c5f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #35744 -- Removed problematic __in lookup in test_intersection_in_nested_subquery.</title>
<updated>2026-01-28T01:18:50Z</updated>
<author>
<name>Tim Graham</name>
<email>timograham@gmail.com</email>
</author>
<published>2026-01-27T01:40:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=5d5f95da40afbaede9f483de891c14f5da0e8218'/>
<id>urn:sha1:5d5f95da40afbaede9f483de891c14f5da0e8218</id>
<content type='text'>
It's problematic on MongoDB. Simon: "It seems odd that we'd use
__in=OuterRef("pk") over __in=[OuterRef("pk")]. It's a SQLism that
only works because right-hand-side is wrapped with (...) and that's
interpreted as a singleton tuple which is allowed with IN."
</content>
</entry>
<entry>
<title>Fixed #36388 -- Made QuerySet.union() return self when called with no arguments.</title>
<updated>2025-05-19T08:34:14Z</updated>
<author>
<name>Colleen Dunlap</name>
<email>colleendunlap@Colleens-Air.lan</email>
</author>
<published>2025-05-15T19:41:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=802baf5da5b8d8b44990a8214a43b951e7ab8b39'/>
<id>urn:sha1:802baf5da5b8d8b44990a8214a43b951e7ab8b39</id>
<content type='text'>
Regression in 9cb8baa0c4fa2c10789c5c8b65f4465932d4d172.
Thank you to Antoine Humeau for the report and Simon Charette for the review.
</content>
</entry>
<entry>
<title>Fixed #35011, Refs #28900 -- Added tests for QuerySet.union() with multiple models and DateTimeField annotations.</title>
<updated>2024-11-08T12:16:44Z</updated>
<author>
<name>Jacob Rief</name>
<email>jacob.rief@gmail.com</email>
</author>
<published>2024-10-30T16:04:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=40bfd7b09aa0907b143e96f0b055538f476e544e'/>
<id>urn:sha1:40bfd7b09aa0907b143e96f0b055538f476e544e</id>
<content type='text'>
Ticket was resolved by 65ad4ade74dc9208b9d686a451cd6045df0c9c3a as part of #28900.
</content>
</entry>
<entry>
<title>Fixed #35744 -- Relabelled external aliases of combined queries.</title>
<updated>2024-10-14T23:21:48Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2024-10-14T23:21:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=53ea4cce2fd08e84b9cdb6363267ccb9525f7060'/>
<id>urn:sha1:53ea4cce2fd08e84b9cdb6363267ccb9525f7060</id>
<content type='text'>
Just like normal queries, combined queries' outer references might fully
resolve before their reference is assigned its final alias.

Refs #29338.

Thanks Antony_K for the report and example, and thanks Mariusz Felisiak
for the review.</content>
</entry>
<entry>
<title>Fixed #35559 -- Avoided unnecessary query on sliced union of empty queries.</title>
<updated>2024-07-19T06:54:47Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2024-06-26T03:39:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=9cb8baa0c4fa2c10789c5c8b65f4465932d4d172'/>
<id>urn:sha1:9cb8baa0c4fa2c10789c5c8b65f4465932d4d172</id>
<content type='text'>
While refs #34125 focused on the SQL correctness of slicing of union of
potentially empty queries it missed an optimization opportunity to avoid
performing a query at all when all queries are empty.

Thanks Lucidiot for the report.
</content>
</entry>
<entry>
<title>Fixed #28900 -- Propagated all selected fields to combinator queries.</title>
<updated>2024-07-03T14:36:25Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-03-30T05:23:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=6d220963fa275a8431fcbcc05de1468f9f8bc3d3'/>
<id>urn:sha1:6d220963fa275a8431fcbcc05de1468f9f8bc3d3</id>
<content type='text'>
Previously, only the selected column aliases would be propagated and
annotations were ignored.
</content>
</entry>
<entry>
<title>Refs #28900 -- Made SELECT respect the order specified by values(*selected).</title>
<updated>2024-07-03T14:36:25Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-03-28T04:13:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=65ad4ade74dc9208b9d686a451cd6045df0c9c3a'/>
<id>urn:sha1:65ad4ade74dc9208b9d686a451cd6045df0c9c3a</id>
<content type='text'>
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 d6b6e5d0fd4e6b6d0183b4cf6e4bd4f9afc7bf67.

Thanks Mariusz Felisiak and Sarah Boyce for review.
</content>
</entry>
<entry>
<title>Refs #34013 -- Registered instance lookups as documented in tests.</title>
<updated>2023-12-16T19:05:36Z</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-12-16T19:05:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=eea4f92f9aa57d1b25f1c28d11c3b5a6a5841e82'/>
<id>urn:sha1:eea4f92f9aa57d1b25f1c28d11c3b5a6a5841e82</id>
<content type='text'>
</content>
</entry>
</feed>
