﻿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
2520	[patch] Invalid SQL generated when searching, using Foreign Keys in ordering but not in searching	coordt@…	Adrian Holovaty	"A ProgrammingError, missing FROM-clause entry is generated in the following specific conditions:

1. A Foreign Key is used in model.Meta.ordering
2. The Foreign Key is NOT in the model.Admin.search_fields
3. You perform a search.

The JOIN is not made with the Foreign Key, but it is listed in the ORDER BY clause."	defect	closed	Database layer (models, ORM)		normal	fixed			Unreviewed	1	0	0	0	0	0
