Re: [Django] #373: Add support for multi-columns fields.

88 views
Skip to first unread message

Django

unread,
Dec 11, 2023, 5:24:17 AM12/11/23
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Clouds
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

#5929 was marked as a duplicate of this ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:163>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 11, 2023, 7:25:44 AM12/11/23
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Clouds
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by HAMA Barhamou):

Dear Members of Tickets #5929 and #373, I invite you to join a new
discussion to clarify the differences and overlaps between these two
tickets and address why #373 was marked as a duplicate

[https://forum.djangoproject.com/t/request-for-clarification-and-guidance-
on-the-status-of-ticket-5929-following-closure-of-ticket-373/26075]

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:164>

Django

unread,
Dec 11, 2023, 11:47:13 AM12/11/23
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Clouds
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bcail):

* cc: bcail (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:165>

Django

unread,
Dec 11, 2023, 11:08:16 PM12/11/23
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Clouds
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by אורי):

* cc: אורי (removed)


--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:166>

Django

unread,
Dec 15, 2023, 6:07:43 PM12/15/23
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Clouds
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by şuayip üzülmez):

* cc: şuayip üzülmez (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:167>

Django

unread,
Apr 7, 2024, 12:36:03 AM4/7/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Clouds
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

I added a patch: https://github.com/django/django/pull/18056
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:168>

Django

unread,
May 13, 2024, 8:14:56 PM5/13/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Clouds
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Martin Paquette):

* cc: Martin Paquette (removed)

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:169>

Django

unread,
May 16, 2024, 6:20:36 AM5/16/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* needs_better_patch: 1 => 0
* needs_docs: 1 => 0
* owner: Clouds => Csirmaz Bendegúz

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:170>

Django

unread,
May 17, 2024, 9:40:36 AM5/17/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:171>

Django

unread,
May 23, 2024, 11:12:56 AM5/23/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:172>

Django

unread,
Jun 19, 2024, 1:41:41 AM6/19/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* cc: Csirmaz Bendegúz (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:173>

Django

unread,
Jul 8, 2024, 11:14:22 AM7/8/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | 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/373#comment:174>

Django

unread,
Jul 23, 2024, 1:14:44 PM7/23/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* needs_better_patch: 1 => 0

Comment:

I have a patch but it's quite large.
I separated the tuple lookups to another PR for easier review, please
check.

https://github.com/django/django/pull/18404
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:175>

Django

unread,
Aug 1, 2024, 11:26:19 AM8/1/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"1eac690d25dd49088256954d4046813daa37dc95" 1eac690d]:
{{{#!CommitTicketReference repository=""
revision="1eac690d25dd49088256954d4046813daa37dc95"
Refs #373 -- Added tuple lookups.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:176>

Django

unread,
Aug 1, 2024, 12:00:34 PM8/1/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | 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/373#comment:177>

Django

unread,
Aug 5, 2024, 11:10:05 AM8/5/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* needs_better_patch: 1 => 0

Comment:

I separated another small refactoring for easier review.
This PR introduces the {{{Field.is_set()}}} function, please check.

https://github.com/django/django/pull/18450
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:178>

Django

unread,
Aug 12, 2024, 1:55:11 PM8/12/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1

Comment:

Setting patch needs improvement following feedback in
[https://github.com/django/django/pull/18450 PR 18450]
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:179>

Django

unread,
Aug 13, 2024, 12:19:22 AM8/13/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* needs_better_patch: 1 => 0

Comment:

Replying to [comment:179 Natalia Bidart]:
> Setting patch needs improvement following feedback in
[https://github.com/django/django/pull/18450 PR 18450]

Thank you for the thorough review Natalia!
You're completely right. I adjusted my PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:180>

Django

unread,
Aug 13, 2024, 5:15:19 PM8/13/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1

Comment:

I found a few more candidates for replacement in
[https://github.com/django/django/pull/18450 PR 18450], setting the flag
until Ben confirms (or rejects :-)).
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:181>

Django

unread,
Aug 14, 2024, 4:47:09 AM8/14/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* needs_better_patch: 1 => 0

Comment:

Replying to [comment:181 Natalia Bidart]:
> I found a few more candidates for replacement in
[https://github.com/django/django/pull/18450 PR 18450], setting the flag
until Ben confirms (or rejects :-)).

Thank you! I had some
[https://github.com/django/django/pull/18450#issuecomment-2288108574
reasons] for not changing those but now I actually think you're right,
most of these can be refactored as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:182>

Django

unread,
Sep 9, 2024, 4:47:02 PM9/9/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by GitHub <noreply@…>):

In [changeset:"5865ff5adcf64da03d306dc32b36e87ae6927c85" 5865ff5]:
{{{#!CommitTicketReference repository=""
revision="5865ff5adcf64da03d306dc32b36e87ae6927c85"
Refs #373 -- Added Model._is_pk_set() abstraction to check if a Model's PK
is set.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:183>

Django

unread,
Sep 10, 2024, 12:48:42 AM9/10/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Maciej Bliziński):

* cc: Maciej Bliziński (removed)

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:184>

Django

unread,
Sep 10, 2024, 9:29:52 AM9/10/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

Thanks Natalia!

Once again, I found two ''tiny'' adjustments that I separated into their
own PRs for easier review, they should be a quick win:

1. Removed outdated comment from RelatedIn.
([https://github.com/django/django/pull/18564 #18564])
2. Added ColPairs.!__repr!__.
([https://github.com/django/django/pull/18565 #18565])
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:185>

Django

unread,
Sep 11, 2024, 5:23:12 AM9/11/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"727587c08955e4e42a5b82bfb75d51517b50c976" 727587c0]:
{{{#!CommitTicketReference repository=""
revision="727587c08955e4e42a5b82bfb75d51517b50c976"
Refs #373 -- Refactored variable assignments in ColPairs and tuple
lookups.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:187>

Django

unread,
Sep 11, 2024, 5:23:12 AM9/11/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"347ab72c0253796d7ac3d1396dcd3b220ad18af1" 347ab72]:
{{{#!CommitTicketReference repository=""
revision="347ab72c0253796d7ac3d1396dcd3b220ad18af1"
Refs #373 -- Improved test coverage of tuple lookup checks.

This also removed unreachable checks.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:186>

Django

unread,
Sep 11, 2024, 10:32:16 AM9/11/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by GitHub <noreply@…>):

In [changeset:"96c990795c0bd494d20a44e0dee0aea0dd7587a0" 96c9907]:
{{{#!CommitTicketReference repository=""
revision="96c990795c0bd494d20a44e0dee0aea0dd7587a0"
Refs #373 -- Removed outdated comment in RelatedIn lookup.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:188>

Django

unread,
Sep 11, 2024, 2:58:11 PM9/11/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

I have made some [https://github.com/django/django/pull/18572 improvements
to the tuple lookups].

My goal is to make tuple lookups easier to use.
Once these improvements are merged, I can separate the
{{{supports_tuple_in_subquery}}} into its own PR for easier review.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:189>

Django

unread,
Sep 12, 2024, 4:31:53 AM9/12/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by elonzh):

* cc: elonzh (removed)

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:190>

Django

unread,
Sep 17, 2024, 8:26:08 AM9/17/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"9ca1f6eff6f19d1ae074d289c6c4209073351805" 9ca1f6ef]:
{{{#!CommitTicketReference repository=""
revision="9ca1f6eff6f19d1ae074d289c6c4209073351805"
Refs #373, Refs #24121 -- Added ColPairs.__repr__().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:191>

Django

unread,
Sep 20, 2024, 6:03:44 AM9/20/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"c2c7dbb2f88ce8f0ef6d48a61b93866c9926349a" c2c7dbb]:
{{{#!CommitTicketReference repository=""
revision="c2c7dbb2f88ce8f0ef6d48a61b93866c9926349a"
Refs #373 -- Updated TupleIsNull lookup to check if any is NULL rather
than all.

Regression in 1eac690d25dd49088256954d4046813daa37dc95.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:192>

Django

unread,
Sep 26, 2024, 10:26:01 AM9/26/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"5ed72087c450af1a5da138bdfa674a069cf3f09c" 5ed72087]:
{{{#!CommitTicketReference repository=""
revision="5ed72087c450af1a5da138bdfa674a069cf3f09c"
Refs #373 -- Added support for using tuple lookups in filters.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:193>

Django

unread,
Sep 26, 2024, 12:22:13 PM9/26/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

Thank you Sarah!

I have submitted a follow-up to add the tuple lookup validations that got
removed previously, this time with extensive test coverage:
[https://github.com/django/django/pull/18623 Refs #373 -- Added additional
validations to tuple lookups.]
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:194>

Django

unread,
Oct 14, 2024, 8:52:08 AM10/14/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"97c05a64ca87253e9789ebaab4b6d20a1b2370cf" 97c05a6]:
{{{#!CommitTicketReference repository=""
revision="97c05a64ca87253e9789ebaab4b6d20a1b2370cf"
Refs #373 -- Added additional validations to tuple lookups.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:195>

Django

unread,
Oct 14, 2024, 3:59:44 PM10/14/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

Thank you Sarah!

I have submitted the follow-up:
[https://github.com/django/django/pull/18674 Refs #373 -- Added TupleIn
subqueries.]
It separates some code from the main PR
([https://github.com/django/django/pull/18056 #18056]) for easier review.

Cheers
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:196>

Django

unread,
Oct 18, 2024, 12:57:12 PM10/18/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

Replying to [comment:162 Mariusz Felisiak]:
> Summary: Add support for multiple-column primary keys → Add support
for multi-columns fields.

It would be best to limit the scope of this ticket to the original goal of
implementing ''**composite primary keys**''.

We can include **''admin support''** + **''generic foreign key support''**
as requested by
[https://code.djangoproject.com/ticket/373?replyto=162#comment:3 Jacob],
but we shouldn't extend the scope beyond that.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:197>

Django

unread,
Nov 1, 2024, 3:15:19 AM11/1/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"03c0a3de722c4a7de9f3edfeb26417ebc8b90fe9" 03c0a3d]:
{{{#!CommitTicketReference repository=""
revision="03c0a3de722c4a7de9f3edfeb26417ebc8b90fe9"
Refs #373 -- Used a feature flag to disable composite subquery test on
MySQL.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:198>

Django

unread,
Nov 4, 2024, 3:21:03 AM11/4/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
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:"f7601aed515a125cde776ebbf6ff6e8432cbafdb" f7601ae]:
{{{#!CommitTicketReference repository=""
revision="f7601aed515a125cde776ebbf6ff6e8432cbafdb"
Refs #373 -- Added TupleIn subqueries.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:199>

Django

unread,
Nov 5, 2024, 6:18:29 PM11/5/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

Thanks Sarah!

I can't find anything else that can be merged separately.
I rebased [https://github.com/django/django/pull/18056 Fixed #373 -- Added
CompositePrimaryKey.]

It looks big but there are only 442 lines of code changes in `django`, the
rest are `docs` and `tests`.
Any review is appreciated.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:200>

Django

unread,
Nov 5, 2024, 6:54:16 PM11/5/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ben Finney):

Replying to [comment:197 Csirmaz Bendegúz]:
> It would be best to limit the scope of this ticket to the original goal
of implementing ''**composite primary keys**''.

I agree with this. Can we please re-title this issue, back to “Add support
for multiple-column primary keys”?

Csirmaz has an implementation of a composite primary key, and it correctly
refers to this issue (#373) requesting composite primary key.

The implementation of an *individual field* with multiple columns, is not
the same thing, and in principle is not required. (In practice it may be
one feasible implementation, but it is not necessarily related to this
one.) There is an existing issue (#5929) requesting multi-column fields,
which I argue should be re-opened since it is a distinct issue.

I ask that the title change, made last year (see
https://code.djangoproject.com/ticket/373?replyto=197#comment:162 ) should
be reversed, as Csirmaz describes.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:201>

Django

unread,
Nov 5, 2024, 6:57:26 PM11/5/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ben Finney):

Replying to [comment:201 Ben Finney]:
> The implementation of an *individual field* with multiple columns, is
not the same thing, and in principle is not required. (In practice it may
be one feasible implementation, but it is not necessarily related to this
one.) There is an existing issue (#5929) requesting multi-column fields,
which I argue should be re-opened since it is a distinct issue.

(Yes, I'm aware there was a discussion opened on a different platform to
address this. That discussion is not open to anyone who can't use a GitHub
account to authenticate, so I raise the matter here where I can
participate.)
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:202>

Django

unread,
Nov 7, 2024, 2:48:24 AM11/7/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:203>

Django

unread,
Nov 14, 2024, 10:45:52 AM11/14/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce):

We have received several approvals to
https://github.com/django/django/pull/18056 and plan to land this soon
I would like to scope this ticket to composite/multi-column primary keys
and create the following new tickets:
- ticket for composite/multi-column FK support (related existing PR:
https://github.com/django/django/pull/18205)
- ticket for Generic FKs to support composite primary keys
- ticket for the admin to support Models with multi-column fields (esp.
CompositePrimaryKeys)

Unless someone disagrees, I will rename this to `Add support for multi-
columns primary key fields.` and create other tickets shortly
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:204>

Django

unread,
Nov 14, 2024, 5:08:08 PM11/14/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ben Finney):

Thank you for moving on this, Sarah.

Replying to [comment:204 Sarah Boyce]:
> I would like to scope this ticket to composite/multi-column primary keys
and create the following new tickets:
> - ticket for composite/multi-column FK support (related existing PR:
https://github.com/django/django/pull/18205)
> - ticket for Generic FKs to support composite primary keys
> - ticket for the admin to support Models with multi-column fields (esp.
CompositePrimaryKeys)

Yes, those are great.

> Unless someone disagrees, I will rename this to `Add support for multi-
columns primary key fields.` and create other tickets shortly

Slight disagreement: a composite key is not a field, it's a key (composed
of multiple fields). I suggest "Add support for multi-column keys" is
accurate.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:205>

Django

unread,
Nov 14, 2024, 5:14:05 PM11/14/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):

> Slight disagreement: a composite key is not a field, it's a key
(composed of multiple fields). I suggest "Add support for multi-column
keys" is accurate.

It's more than a ''key'' in this case Ben as the proposed changes lays
down the foundation to refer to the primary key as a field itself. So in
this case it is a field in the Django sense even if it's not a
field/column in the SQL sense.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:206>

Django

unread,
Nov 14, 2024, 6:19:40 PM11/14/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Appuchia):

* cc: Appuchia (removed)

--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:207>

Django

unread,
Nov 15, 2024, 2:13:04 AM11/15/24
to django-...@googlegroups.com
#373: Add support for multi-columns fields.
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Csirmaz
| Bendegúz
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

Yes, my proposal is to implement composite PKs as a ''virtual field". This
has been discussed before I came along, many believe it's the most natural
way to implement this feature in Django. I pushed against it initially,
but after working on the issue for a long time I had to admit it's the
best approach.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:208>
Reply all
Reply to author
Forward
0 new messages