Changes between Version 9 and Version 10 of CompositePrimaryKeyDesignNotes


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

--

Legend:

Unmodified
Added
Removed
Modified
  • CompositePrimaryKeyDesignNotes

    v9 v10  
    44
    55== Design Questions ==
    6 '''How do you define multiple primary keys?'''
     6''How do you define multiple primary keys?''
    77
    88The "neatest" solution would be to allow primary_key=True on multiple fields but this may be precluded by other design considerations.
    99
    10 '''How do you foreign key onto a table with a composite foreign key?'''
     10''How do you foreign key onto a table with a composite foreign key?''
    1111
    12 '''What do you use for .get(pk=foo) with a composite primary key?'''
     12''What do you use for .get(pk=foo) with a composite primary key?''
    1313
    1414The likely solution is to use a tuple or dictionary though there is mention of the comment framework overlapping with this.
    1515
    16 '''Admin urls need a consistent way of mapping a url to an object'''
     16''Admin urls need a consistent way of mapping a url to an object''
    1717
    1818Should be able to be handled with some nice url escaping.
Back to Top