﻿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
13706	dbrouter uses wrong database on many2many addition	cheerios	nobody	"{{{
DATABASE_ROUTERS = ['dbrouter.BRouter', 'dbrouter.ARouter',]

(form submission)
item.save() # B
paper = Paper()
paper.save() # B
item.attachments.add(paper)  # writes to A, fails
}}}

BRouter routes traffic to database B, Arouter falls back on 'default' database.
All models read/write fine (on both databases), but adding a many2many relation for a table that saves to B (with all FKs in B) won't work unless Arouter's (!) db_to_write() does assert/print model._meta.app_label

"		closed	Database layer (models, ORM)	1.2		worksforme			Unreviewed	0	0	0	0	0	0
