A simple annotation broke when I migrated by app from Django 1.8.x to 1.9.2, and I can't figure out why for the life of me.
Calling Company.objects.all().annotate(ticketcount=Count('srservice'))
throws an error "ProgrammingError: column "company.owner_id" must appear in the GROUP BY clause or be used in an aggregate function"
Rolling back to Django 1.8.5 fixes the problem.
The DB backend is Postgres.
Please ignore the horrible DB schema. It's not mine. It's an introspection of a horrible Windows ticketing app.
Am I missing something?
-A