﻿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
37059	`.only(..)` does not check eagerly if the fields exists	Willem Van Onsem		"Django's `QuerySet`s are lazy, but the checks for (most) methods are eagerly, I think. For example:

{{{
us = User.objects.filter(bla='qux')
}}}

will raise an error.

But `only(..)` seems to be an exception on this. If we use:

{{{
us = User.objects.only('bla')
}}}

it will only raise if we evaluate `us` (enumerate, aggregate, str/len/...).

It seems nice that `.only(..)` would check eagerly if the fields are available, otherwise tests might succeed if the queryset is in some cases not evaluated.

A possible problem might be that `.only(..)` could strictly speaking mention fields that are not *yet* defined, but later in the chain of ORM method calls."	New feature	new	Uncategorized	6.0	Normal				Unreviewed	0	0	0	0	0	0
