Am 10.05.2006 um 20:09 schrieb James Bennett: > You'll probably want to read this and save yourself some time: > > http://www.djangoproject.com/documentation/faq/#do-django-models- > support-multiple-column-primary-keys
This indicates that you could simply ignore the problem and add a composite unique key. But this is not the case. There is no way to define a model without primary key and later add a composite unique key. You always end up with a model that has an automatically generated "id" attribute that is the primary key. This is fine when you start a fresh project with database structure under your control. But I need this for an ugly existing database (tm) that I cannot touch. And, of course, it's a ManyToManyField in very open disguise, but it has additional attributes. Unfortunately, a ManyToManyField is based on an association table with an additional id primary key ... so it doesn't help me. Actually, this is my problem. I'm open to any different way to handle this, sure. But my core condition is: I cannot change the database structure. Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---
