Browse files

Added 'Does Django support multiple-column primary keys?' to FAQ

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
adrianholovaty committed Jan 31, 2006
1 parent 233708f commit 41fac5f9efc278bc37264e85f464601063b7eae8
Showing with 12 additions and 0 deletions.
  1. +12 −0 docs/faq.txt
@@ -363,6 +363,18 @@ avoid automating. That said, there's some work being done to add a
`` 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

0 comments on commit 41fac5f

Please sign in to comment.