On 5/25/06, Corey <[EMAIL PROTECTED]> wrote: > Is there a way to add additional fields to the many-to many table, or > is there a better way to accomplish what I want. > > I have a Groups table and an Attributes table with a many-to-many > relationship. > > I want to be able to specify the viewing order of the attribute and if > the attribute is required on a per-group basis. > > I would typically put it in a schema like: > > Group GroupAttribute Attribute > --------- --------------- --------- > id group_id id > Name attribute_id Name > viewing_order > required
Hey Corey, Welcome to the Django community. :) The best way to solve your particular problem would be to create a GroupAttribute model rather than using a ManyToManyField in either Group or Attribute. That way, you can give the GroupAttribute model as many extra fields as you want. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
