#25708: cannot annotate with geometry value
----------------------------+--------------------------------------
     Reporter:  sir-sigurd  |                    Owner:  sir-sigurd
         Type:  Bug         |                   Status:  assigned
    Component:  GIS         |                  Version:  1.8
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  1           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------

Comment (by sir-sigurd):

 One does not simply annotate without specifying `output_field`:

 {{{
 Test.objects.annotate(a=Value(1))
 }}}

 raises

 {{{
 FieldError: Cannot resolve expression type, unknown output_field
 }}}
 , so I see no reason why geometry values should be handled differently.

 There is another difference in our approaches: I'm trying to reuse the
 code for preparing SQL that existed before `GeomValue` was added, because
 I believe that `GeometryField` and DB backends are sufficient for this and
 there is no need for another entity.

--
Ticket URL: <https://code.djangoproject.com/ticket/25708#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.103df3d54cfbba58959fbac91aef09fc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to