Ticket #60 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

many-to-many self reference - can't do this

Reported by: jachuf@… Owned by: andrew
Priority: major Milestone: 0.4
Component: migrations Version: 0.3
Keywords: many-to-many self-reference Cc:


I've got Article model which is inheriting from BaseArticle? model. Article has many-to-many self-reference. I found, that I cannot create this type of relationship via South migration - if I use ManyToManyField? in migration it returns None. I tried with mock model and with real model and it didn't work, so I think it is South bug.

Change History

comment:1 Changed 7 years ago by andrew

  • Status changed from new to accepted

Many-to-many fields should work, and I've just finished ironing out a load of bugs with them. Have you tried:

  • Looking at the output of ./manage.py startmigration myapp migname --model Foo?
  • Trying ./manage.py startmigration myapp migname --add-field Foo.mym2m?

If both of these don't work, I'd appreciate the correct snippet of models.py as an attachment.

comment:2 Changed 7 years ago by andrew

  • Milestone set to 0.4

comment:3 Changed 7 years ago by andrew

  • Status changed from accepted to closed
  • Resolution set to fixed

I've tested this and it definitely works now, even if it uses too many mock models (no harm is done).

Note: See TracTickets for help on using tickets.