#34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.
-------------------------------------+-------------------------------------
     Reporter:  Martin Lehoux        |                    Owner:  Martin
                                     |  Lehoux
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  4.1
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 Martin, the only way I see on how this can be solved is to revisit how
 `BaseExpression._resolve_output_field` deals with variadic ''merge''
 expressions (e.g. `Case`, `Coalesce`) in a way that tries to be a bit more
 clever with regards to type integer types handling. You could give it a
 shot but be aware that it's going to be exploration work, certainly a nice
 way to learn more about the ORM works but not necessarily one that will
 lead to a fool proof solution.

 In the mean time, I think that the only solution is effectively to add
 explicit `output_field`.

 I'd be happy to review your exploration work but just a small disclaimer
 that I'm not sure what the proper solution might be.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34160#comment:13>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184962e32c4-9ff0a45e-33a8-4dc6-bf06-7bb98ee166bc-000000%40eu-central-1.amazonses.com.

Reply via email to