Russell Keith-Magee wrote: > On 6/7/07, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> And then I hit a snag: there's one table that uses a composite >> primary key made up of three fields. (the attachment table in trac.db) >> >> I've scanned the doco and I've googled, this is what I came up with: >> >> o define one of the fields as a primary >> o add the unique_together Meta constraint >> >> Is there another/better way? > > Unfortunately, no. That's about the best you can do at the moment.
OK. > Composite primary keys are a frequently requested feature, but there > is one major problem - specifying a URL for an object with a composite > key in the Admin application (or any other application for that > matter). > > Suggestions are welcome, but search the archives first, beacuse this > isn't the first time it has been suggested, and there are problems > with many of the obvious ideas. I can see the difficulties. Thanks /Lars --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---