﻿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
19434	"Some QuerySet methods not aware of fields added on ""extra"""	Henrique C. Alves	nobody	"Some examples to illustrate the issue:

{{{
(Pdb) CUSTOM_SQL = ""SELECT some_function(some_field) FROM some_table""

# This works
(Pdb) qs = qs.extra(select={'some_alias': CUSTOM_SQL}, order_by=['some_alias'])

# This fails
(Pdb) qs.filter(some_alias__gt=0)
*** FieldError: Cannot resolve keyword 'some_alias' into field. Choices are: ...

# This works
(Pdb) qs.values()
[{'some_alias': 1}, {'some_alias': 2}]

# This fails
(Pdb) qs.values('some_alias')
*** FieldError: Cannot resolve keyword 'some_alias' into field. Choices are: ...
}}}

There's a situation where half of the API supports `extra` queries correctly, the other half fails with a `FieldError`, and there's no clear indication to what should be the right behavior."	Bug	closed	Database layer (models, ORM)	dev	Normal	wontfix	QuerySet.extra	flo@…	Accepted	1	0	0	1	0	0
