﻿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
34249	Custom RelatedManager documentation should have side tip on prefetch_related	Vaughn Koch	nobody	"This Django documentation shows how to use a custom manager for reverse relations.

https://docs.djangoproject.com/en/4.1/topics/db/queries/#using-custom-reverse-manager

In the given example, this works well as-is, but if you prefetch_related the entries when you're querying Blog, Django will use the prefetch_related cache and ignore the custom manager.

This behavior may/may not be desired, but the documentation could use a side tip about this condition, maybe in a 'Good to know' infobox.

Also, separately: one flaw in the documented approach is that you have to explicitly use the custom manager when making a query - there doesn't seem to be a way to make the custom manager the default, which can cause issues if you forget to add it to all your calls.
"	Cleanup/optimization	closed	Documentation	4.1	Normal	duplicate	documentation relatedmanager custom prefetch_related		Unreviewed	0	0	0	0	0	0
