#373: Add support for multiple-column primary keys
---------------------------------------------------+------------------------
Reporter: jacob | Owner: dcramer
Status: assigned | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords: database
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by fongandrew):
Replying to [comment:32 dcrosta]:
Second that. This appears to add primary-key support only. It would be
nice to have non-unique composite-key indexing. It would be nice for
things like the generic relations in the contenttypes app for instance.
Suggested syntax:
{{{
class MyModel(models.Model):
field_a = models.IntegerField()
field_b = models.IntegerField()
class Meta:
index_together = (('field_a', 'field_b'),)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/373#comment:41>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---