﻿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
24065	aggregate dont find column of annotate	mateuspadua	nobody	"If we try this query, everything works normally

{{{
Entry.objects.annotate(num_authors=Count('authors')).aggregate(Avg('num_authors'))
}}}

but if we try the one below, it does not find the column {{{authors__count}}} to the aggregation

{{{
Entry.objects.annotate(Count('authors')).aggregate(Avg('authors__count'))
}}}

I believe it is a problem because the exception tells us we could use the column {{{authors__count}}}

This is what the exception says:

{{{FieldError: Cannot resolve keyword 'count' into field. Choices are: email, entry, id, name, authors__count}}} <- see the field here.

Thanks.

"	Bug	closed	Database layer (models, ORM)	1.7	Normal	worksforme	aggregate annotate fielderror	mateuspaduaweb@…	Unreviewed	0	0	0	0	0	0
