if you specify one of the fields to be the primary key, you would
probably violate the constraint (PK must be unique on itself)... It
would not work as a many-to-many:
1,2
2,2
2,1 -- couldn't do that, violates PK

On 5/10/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
>
>
> Am 10.05.2006 um 21:27 schrieb James Bennett:
>
> >
> > On 5/10/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
> >> 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.
> >
> > So... model it with primary_key=True on one of the fields, and a
> > unique_together in the model's Meta class.
>
> Hmm. Just to make sure I understand, I fake Django into thinking that
> one key is a primary, but in the database it is different?
>
> I think you'll run into many problems since everything expects that
> it can do a get(pk=...), which wouldn't work. And I'm not talking
> about the admin pages, they are out of question anyway.
> Have you already tried this path? I'll try along these lines (though,
> it's late evening here, so probably tomorrow)
>
> Michael
>
>
> >
>


--
Honza Král
E-Mail: [EMAIL PROTECTED]
ICQ#:   107471613
Phone:  +420 606 678585

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to