Try using the related_name option in you manytomany feilds as it might clear up some of your tables. I agree however posting your models.py will quickly clear this problem up.
On May 1, 9:46 am, MattW <[EMAIL PROTECTED]> wrote: > Dear All, > > I'm having problems with the Many-to-Many relations in my model. > > I've got a list of questions, each of which has a number of marks > associated with it. The marks are in another table in the DB. I've > modelled it as Many-to-Many because it seems that each question can > have many marks, and each mark (only 1-5) could be associated with > many questions. > > I've tried using both sqlite and mysql (although through mysql_old, as > I don't have the new Python MySQL interface). Under sqlite I get: > OperationalError columns X and Y are not unique. Under MySQL, I get > IntegrityError at xxx, (1062, "Duplicate entry '1-1' for key 2"). > Looking at the DB in PhPMySQL, there's a primary key for the Mark > table (which has three fields, id, question_id and mark_id), composed > of the question_id and mark_id fields. I suspect that this is the > problem, as the mark can change... > > Any help in rectify the model.py file would be welcome. > > Thanks, > > Matt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---