﻿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
32187	The .select_related is not necessary in the .update documentation	Willem Van Onsem	Hasan Ramezani	"This question on StackOverflow is questioning a part of the documentation https://stackoverflow.com/q/64795627/67579

It asks what the use is of the .select_related in:


{{{
>>> Entry.objects.select_related().filter(blog=b).update(headline='Everything is the same')
}}}

To the best of my knowledge, there is no use of .select_reated in case of a .update(..). Likely the ORM will ignore .select_related and .prefetch_related calls, and if it does not, it can cause problems since an UPDATE ... query with a JOIN ... clause results in problems about what table to update and how.

It thus might be better to omit the .select_related() part here. Likely this is due to copying from another part of the documentation."	Bug	closed	Documentation	3.1	Normal	fixed	orm, query, documentation		Accepted	0	0	0	0	1	0
