﻿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
3871	Use custom managers in reverse relations	EspenG	v1v3kn	"This is my case:[[BR]]
I got a Article model with two managers, the default ""objects"" and a custom one ""published_objects"". My Article model also got a foreign key to a Category model.[[BR]]
From the Category model I'm then able to write a_category.article_set.do_something(). The problem is then that this only allows me to use the default manager ""objects"", and not ""published_objects"".

More general:[[BR]]
It's not possible to override witch manager to use using reverse relations like foo.xxx_set 

Possible syntax's for doing this:[[BR]]
On IRC someone came up with foo.xxx_set_manager1.all(), foo.xxx_set_manager2.all(), that is foo.xxx.set_<manager_name>.all().[[BR]]
One other way I came up with is using foo.xxx_set for the default manager, and then if you want to access a custom manager you could do something like this: foo.xxx_set.managers.my_custom_manager.all().[[BR]]
Others?[[BR]]

Hopefully someone got a great ide on how this should be done."	New feature	closed	Database layer (models, ORM)	dev	Normal	fixed		"paolo@… espen@… v1v3kn Sebastian Goll r.dav.lc@… daevaorn@… Stephane ""Twidi"" Angel jdunck@… loic@…"	Ready for checkin	1	0	0	0	0	0
