#373: Django lacks support for multiple-column primary keys
------------------------+---------------------------------------------------
 Reporter:  jacob       |        Owner:  adrian  
     Type:  defect      |       Status:  reopened
 Priority:  low         |    Milestone:          
Component:  Metasystem  |      Version:          
 Severity:  normal      |   Resolution:          
 Keywords:  database    |  
------------------------+---------------------------------------------------
Changes (by jacob):

  * resolution:  wontfix =>
  * status:  closed => reopened

Comment:

 This is something that gets asked about a lot, so I'm going to reopen this
 ticket as a place to keep track of it.
 
 Personally I don't have time to work on this, but if the LazyWeb can work
 up a patch, it would be quite nice to have.  From an email I wrote a while
 back, here are the issues (that I'm aware of) that would need to be solved
 to make this work:
 
 There's three basic problems in dealing with composite primary keys in
 Django.
 
 The first is that a number of APIs use "obj._meta.pk" to access the
 primary key field (for example, to do "pk=whatever" lookups).  A composite
 PK implementation would need to emulate this in some way to avoid breaking
 everything.
 
 Second, a number of things use (content_type_id, object_pk) tuples to
 refer to some object -- look at the comment framework, or the admin log
 API.  Again, a composite PK system would need to somehow not break this.
 
 Finally, there's the issue of admin URLs; they're of the form
 "/app_label/module_name/pk/"; there would need to be a way to map URLs to
 objects in the absence of a primary key.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/373>
Django <http://code.djangoproject.org/>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to