﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1346	django-admin creates invalid m2m table if the related models have same primary key name	Russell Keith-Magee	Russell Keith-Magee	"Consider the following model
{{{
class Article(models.Model):
    ...
    related = models.ManyToManyField(""Article"")
}}}

This model currently breaks magic-removal - the SQL created on install is invalid, because the m2m table for the many-to-many field has two columns named article_id. This is easy to cause if you recursively define a m2m relationship; you can probably get a similar problem if you use custom primary key names.

At the very least, this should be picked up as a validation error; ideally, we need a strategy for producing unique column names in the m2m table.
"	defect	closed	Core (Management commands)	magic-removal	normal	fixed	recursive m2m primary key		Unreviewed	0	0	0	0	0	0
