Changes between Version 8 and Version 9 of CompositePrimaryKeyDesignNotes


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

--

Legend:

Unmodified
Added
Removed
Modified
  • CompositePrimaryKeyDesignNotes

    v8 v9  
    44
    55== Design Questions ==
    6 '''How 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.
     6'''How do you define multiple primary keys?'''
     7
     8The "neatest" solution would be to allow primary_key=True on multiple fields but this may be precluded by other design considerations.
    79
    810'''How do you foreign key onto a table with a composite foreign key?'''
     11
     12'''What do you use for .get(pk=foo) with a composite primary key?'''
     13
     14The likely solution is to use a tuple or dictionary though there is mention of the comment framework overlapping with this.
     15
     16'''Admin urls need a consistent way of mapping a url to an object'''
     17
     18Should be able to be handled with some nice url escaping.
    919
    1020== Affected Areas ==
     
    1828
    1929=== Queries ===
    20 Model.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.
     30Model.objects.get(pk=foo) needs to be supported.
    2131
    2232=== Forms ===
     
    2535Expect there is a large amount of work in here making sure all the model inspection and form generation works.
    2636
    27 The other thing mentioned has been the url to object mapping which should be able to be handled with some nice url escaping.
     37Url to object mapping.
    2838
    2939=== Serialization ===
Back to Top