#373: Add support for multiple-column primary keys
-------------------------------------+-------------------------------------
Reporter: Jacob | Owner: Michal
| Petrucha
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Solomon Ucko):
* cc: Solomon Ucko (added)
Comment:
It's been about 13 years since this issue was created and about 8 years
since work on it has begun, and it ''still'' hasn't been implemented! Does
the basic functionality at least work? FWIW, AFAIK the main motivation for
this feature is "relationship tables" (i.e. ones that link 2 or more
tables together), which is relatively common. Also, a better API might be
allowing `primary_key` to be set on multiple fields. For my use case, I
don't need to reference the set of columns directly from the database,
just in the view logic. (The item specified by the URL and the current
user are my two primary keys.) I could just use `unique_together`, but I'd
rather not unnecessarily add an extra column. It's not that much of a
problem, but I'd prefer not to need to.
--
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:134>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.c22c59f624fb9feb1cdbde340a95c3cc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.