Re: Possible Bug (MYSQL)

2016-06-02 Thread Josh Smeaton
Hi Paulo, Have you opened a ticket on Trac for this yet? If not, please do so. This mailing list isn't really for verifying bugs. That said, does the query work if you provide an actual alias for the aggregate? *Company.objects.annotate(max_pk=Max('employee__p

Possible Bug (MYSQL)

2016-05-30 Thread Paulo Gabriel Poiati
Hello, I would like some help from the core guys. I'm getting an error while executing the following query (the objective of this query is basically get the last created employee for each company): *Company.objects.annotate(Max('employee__pk')).filter(employee__pk=F('employee__pk__max'))* The er