Changes between Version 8 and Version 9 of CompositePrimaryKeyDesignNotes
- Timestamp:
- Jul 22, 2010, 8:08:03 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CompositePrimaryKeyDesignNotes
v8 v9 4 4 5 5 == 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 8 The "neatest" solution would be to allow primary_key=True on multiple fields but this may be precluded by other design considerations. 7 9 8 10 '''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 14 The 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 18 Should be able to be handled with some nice url escaping. 9 19 10 20 == Affected Areas == … … 18 28 19 29 === 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.30 Model.objects.get(pk=foo) needs to be supported. 21 31 22 32 === Forms === … … 25 35 Expect there is a large amount of work in here making sure all the model inspection and form generation works. 26 36 27 The other thing mentioned has been the url to object mapping which should be able to be handled with some nice url escaping.37 Url to object mapping. 28 38 29 39 === Serialization ===