2008/12/10 nucles <[EMAIL PROTECTED]>: > > Hello, > > If we create 2 models with many-to-many relationship django creates > the intermediary table automatically for us. > How can i use this intermediate table to relate other entities? Can i > access to the primary field of the intermediary table? > Should i create two One-to-Many relations manually and then use the > intermediary table?
No, you should still use a ManyToManyField, but use the 'through' argument to specify the intermediate model, on which you should have two ForeignKey fields referencing each of your two models. This way you will have full control over the intermediate table. Read more about this at: http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships I'll have to quietly ask the same question as Malcolm though; is this really what you want? Regards, Elvis > > Thank you for any suggest > > Regardes, > Dennis > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

