﻿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
24998	ManyToManyField generating wrong query	Arthur Rio	nobody	"If two models have a ManyToManyField pointing to the same model, the query generated for the lookup is incorrect. I have created a repo on github with a simple test (https://github.com/arthurio/manytomanybug/releases/tag/v1.0) and you can also find the code enclosed as a .zip file.

There are 3 models:
- Upload: that will be common to several other models.
- FormA with a ManyToManyField to the Upload model.
- FormB with a ManyToManyField to the Upload model.

When trying to do formAinstance.signature.all(), the query generated is using the FormB table to do the join instead of the FormA table."	Bug	new	Database layer (models, ORM)	dev	Normal		ManyToManyField, bad query		Unreviewed	0	0	0	0	0	0
