#33257: Case() and ExpressionWrapper() doesn't work with DecimalField on SQLite.
-------------------------------------+-------------------------------------
     Reporter:  Matthijs Kooijman    |                    Owner:  Matthijs
                                     |  Kooijman
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               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 Matthijs Kooijman):

 Thanks for confirming that SQLiteNumericMixin is the right approach here.
 I'll try to find some time to prepare a PR with that.

 Any suggestions on where the testcases for this should live? I put them at
 model_fields/decimal_field now, but they also relate to SQLite, query
 expressions, and maybe other SQLite numeric fields, so maybe there is a
 better place for them?

 I also had a look through expressions.py, and it seems that most
 expressions already have SQLiteNumericMixin, except:
  - Case & ExpressionWrapper: These break without, so should get it.
  - When: This is a partial expression, so probably does not need it.
  - Subquery: I suspect this also needs it, but I'll try to make a testcase
 that breaks it first.
  - OrderBy: I'm not sure about this one, I couldn't find any docs on how
 this is used exactly..
  - WindowFrame: This looks like a partial expression to me that doesn't
 need it?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33257#comment:3>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.08ad0ac69752ea1f325b22c97120d7ff%40djangoproject.com.

Reply via email to