From 192bc7a7be92e20cc250907fb4083df689715679 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Sat, 14 Jun 2025 11:04:17 -0400 Subject: Fixed #36464 -- Fixed "__in" tuple lookup on backends lacking native support. When native support for tuple lookups is missing in a DB backend, it can be emulated with an EXISTS clause. This is controlled by the backend feature flag "supports_tuple_lookups". The mishandling of subquery right-hand side in `TupleIn` (added to support `CompositePrimaryKey` in Refs #373) was likely missed because the only core backend we test with the feature flag disabled (Oracle < 23.4) supports it natively. Thanks to Nandana Raol for the report, and to Sarah Boyce, Jacob Walls, and Natalia Bidart for reviews. --- docs/releases/5.2.4.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/5.2.4.txt b/docs/releases/5.2.4.txt index 521ed94d6c..31f4b8984f 100644 --- a/docs/releases/5.2.4.txt +++ b/docs/releases/5.2.4.txt @@ -16,3 +16,7 @@ Bugfixes * Fixed a regression in Django 5.2.3 where ``Value(None, JSONField())`` used in a :class:`~django.db.models.expressions.When` condition was incorrectly serialized as SQL ``NULL`` instead of JSON ``null`` (:ticket:`36453`). + +* Fixed a crash in Django 5.2 when performing an ``__in`` lookup involving a + composite primary key and a subquery on backends that lack native support for + tuple lookups (:ticket:`36464`). -- cgit v1.3