﻿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
26304	Unable to use unmanaged ManyToMany through models when backed by a View.	Matthew Schinckel	nobody	"Given an unmanaged ManyToMany through model, (i.e., where Meta.managed is explicitly marked as False), running tests attempts to call ""sqlflush"", and truncate this table.

However, I have a situation where this model is actually being backed by a (Postgres) View, which cannot be truncated.

It seems that https://github.com/django/django/blob/53ccffdb8c8e47a4d4304df453d8c79a9be295ab/django/db/backends/base/introspection.py#L83 shows that all many-to-many fields are added for flushing, ignoring managed status.

I believe that this can be resolved by only adding those many-to-many fields that do not have a through model marked as unmanaged."	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed			Accepted	1	0	0	0	0	0
