﻿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
21159	Ability to do .distinct() on extra select columns	bugs@…	nobody	"Hi all,

It would be nice to be able to use columns defined in .extra ( select = ... ) as fields in .distinct (). As it is, SQLCompiler.get_distinct () ends up calling ._setup_joins () on all fields, which fails. SQLCompiler.get_ordering (), on the other hand seems to have a mechanism to cope with extra columns.

Currently I use a hacked custom SQLCompiler for this but it would be nice if I didn't have to.
"	New feature	closed	Database layer (models, ORM)	1.5	Normal	duplicate			Unreviewed	0	0	0	0	0	0
