﻿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
35453	ManyToMany field incorrectly identified as a concrete field on the defining side.	Harro	Ryan P Kilby	"Was looking at some relationship bugs in: https://github.com/bmispelon/django-model-subquery
And when trying to fix it ran into the following problem:

ManyToMany fields are concrete and have a column on the defining side.


Take the User in django, if I do:

{{{
[f.column for f in User._meta.get_fields() if f.concrete]
}}}

You see `groups` in there, but it's a ManyToMany so there is no actual column called groups in the user table.

Then I dove into django and actually see django itself use `local_concrete_fields` internally a lot, which has all the actual fields that have a column.


Shouldn't the ManyToMany basically not be a concrete field so it actually matches what you expect and what the docs say about the field property: 
https://docs.djangoproject.com/en/5.0/ref/models/fields/#django.db.models.Field.concrete"	Bug	closed	Database layer (models, ORM)	5.0	Normal	fixed		Mariusz Felisiak Simon Charette Ryan P Kilby	Ready for checkin	1	0	0	0	0	0
