﻿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
14849	ManyToManyField has weird behavior in 1.2 w/ multi-db	joestump	nobody	"I've got some code that basically goes like this:

{{{

photo = Photo()
photo.tags = tags # List of Tag objects
photo.save()

}}}

`Photo.tags` is a `ManyToManyField` linked to tags. When I attempt to run this on `(1, 2, 3, 'final', 0)` I get the following error:

{{{
Cannot add ""<Tag: girls>"": instance is on database ""None"", value is on database ""default""
}}}

I assume this has something to do with the fact that the photo I created doesn't have a DB connection associated with it until a DB operation is done. The odd part is that this works just fine on my laptop running version `(1, 1, 1, 'final', 0)`. On 1.2.3, though, I have to do the following:

{{{

photo = Photo()
photo.save()
photo.tags = tags
photo.save()

}}}

This seems like unexpected behavior."	Uncategorized	closed	Database layer (models, ORM)	1.2	Normal	worksforme		orm ManyToManyField	Unreviewed	0	0	0	0	0	0
