summaryrefslogtreecommitdiff
path: root/docs/faq.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-01-31 21:38:02 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-01-31 21:38:02 +0000
commit41fac5f9efc278bc37264e85f464601063b7eae8 (patch)
tree28ce9ddc6194acc5303841a0c773981066ba9a57 /docs/faq.txt
parent233708fb683ae2c1cf3e4c00edc2e4842d99a42d (diff)
Added 'Does Django support multiple-column primary keys?' to FAQ
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/faq.txt')
-rw-r--r--docs/faq.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/faq.txt b/docs/faq.txt
index ffeac817a7..786653b9d0 100644
--- a/docs/faq.txt
+++ b/docs/faq.txt
@@ -363,6 +363,18 @@ avoid automating. That said, there's some work being done to add a
``django-admin.py updatedb`` command, which would output the necessary
``ALTER TABLE`` statements, if any.
+Do Django models support multiple-column primary keys?
+------------------------------------------------------
+
+No. Only single-column primary keys are supported.
+
+But this isn't an issue in practice, because there's nothing stopping you from
+adding other constraints (using the ``unique_together`` model option or
+creating the constraint directly in your database), and enforcing the
+uniqueness at that level. Single-column primary keys are needed for things such
+as the admin interface to work; e.g., you need a simple way of being able to
+specify an object to edit or delete.
+
The database API
================