#24171: (1054, "Unknown column '__col1' in 'field list'") when using values,
annotate, and aggregate
-------------------------------------+-------------------------------------
     Reporter:  abdulhaq-e           |                    Owner:  jarshwah
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  1.8beta1
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"3a0fe942ddf56ddcf4b958147f3914fe2788db30"]:
 {{{
 #!CommitTicketReference repository=""
 revision="3a0fe942ddf56ddcf4b958147f3914fe2788db30"
 [1.8.x] Fixed #24171 -- Fixed failure with complex aggregate query and
 expressions

 The query used a construct of qs.annotate().values().aggregate() where
 the first annotate used an F-object reference and the values() and
 aggregate() calls referenced that F-object.

 Also made sure the inner query's select clause is as simple as possible,
 and made sure .values().distinct().aggreate() works correctly.

 Backport of fb146193c49e4c683dc8da39d9b7c479375fdb57 from master
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24171#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.f67fe22340c0fc68f8f3ecd815ee744e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to