Re: [Django] #36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery

15 views
Skip to first unread message

Django

unread,
May 13, 2025, 9:34:29 PMMay 13
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* needs_better_patch: 0 => 1

Comment:

Left some comments about the preferred usage of a feature flag for tuple
comparison against subquery support but otherwise the patch looks great.
--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 14, 2025, 9:29:32 AMMay 14
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:7>

Django

unread,
Aug 1, 2025, 8:47:54 AMAug 1
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:8>

Django

unread,
Aug 2, 2025, 6:58:22 PMAug 2
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:9>

Django

unread,
Aug 6, 2025, 10:01:58 AMAug 6
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:10>

Django

unread,
Aug 7, 2025, 8:28:57 AMAug 7
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"fd569dd45bf0746378faf7f65172497f21ed27f0" fd569dd]:
{{{#!CommitTicketReference repository=""
revision="fd569dd45bf0746378faf7f65172497f21ed27f0"
Fixed #36210, Refs #36181 -- Allowed Subquery usage in further lookups
against composite pks.

Follow-up to 8561100425876bde3be4b2a22324655f74ff9609.

Co-authored-by: Simon Charette <chare...@gmail.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:12>

Django

unread,
Aug 7, 2025, 8:28:57 AMAug 7
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"de7bb7eab84dc53a7117127ad8eec44970efc509" de7bb7e]:
{{{#!CommitTicketReference repository=""
revision="de7bb7eab84dc53a7117127ad8eec44970efc509"
Refs #36210 -- Added missing limits in Subquery tests.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:11>

Django

unread,
Aug 11, 2025, 4:22:17 AMAug 11
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"181e3bd71c0f578a1214523be1f7969393d98892" 181e3bd7]:
{{{#!CommitTicketReference repository=""
revision="181e3bd71c0f578a1214523be1f7969393d98892"
Refs #36210 -- Corrected output_field comparison in
Subquery.resolve_expression().

Regression in fd569dd45bf0746378faf7f65172497f21ed27f0.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:13>

Django

unread,
Aug 11, 2025, 4:23:11 AMAug 11
to django-...@googlegroups.com
#36210: Support exact lookups where lhs is CompositePrimaryKey and rhs is Subquery
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: New feature | Status: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"eed7f44244c90b78bf31f554cd8663f03b84e623" eed7f442]:
{{{#!CommitTicketReference repository=""
revision="eed7f44244c90b78bf31f554cd8663f03b84e623"
Refs #36210 -- Added release note for further subquery support for
composite pks.

Follow-up to fd569dd45bf0746378faf7f65172497f21ed27f0.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36210#comment:14>
Reply all
Reply to author
Forward
0 new messages