Changes between Version 6 and Version 7 of CompositePrimaryKeyDesignNotes


Ignore:
Timestamp:
Jul 22, 2010, 8:02:52 AM (14 years ago)
Author:
hartror
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompositePrimaryKeyDesignNotes

    v6 v7  
    33Collating design considerations, options and decisions here to help get this feature moving.
    44
     5== Design Questions ==
     6How do you define multiple primary keys? The "neatest" solution would be to allow primary_key=True on multiple fields but this may be precluded by other design considerations.
     7
     8How do you foreign key onto a table with a composite foreign key?
     9
    510== Affected Areas ==
    611
    712=== Models ===
     13Need a way of defining the primary key.
     14
     15Generation of the create table SQL.
     16
     17A solution for foreign keying onto a table with a composite primary key.
    818
    919=== Queries ===
     20Model.objects.get(pk=foo) needs to be supported, probably using a tuple or dictionary though there is mention of the comment framework overlapping with this.
     21
     22=== Forms ===
    1023
    1124=== Admin ===
     25Expect there is a large amount of work in here making sure all the model inspection and form generation works.
     26
     27The other thing mentioned has been the url to object mapping which should be able to be handled with some nice url escaping.
    1228
    1329=== Serialization ===
    14 
    15 === Forms ===
     30Code needs to be looked at further but all the foreign keying is likely to need attention.
    1631
    1732== Relevant Discussions ==
Back to Top