#28439: When() [on MySQL] does not work with models using UUID as primary key
-------------------------------------+-------------------------------------
               Reporter:  Dominik    |          Owner:  nobody
  Kozaczko                           |
                   Type:  Bug        |         Status:  new
              Component:  Database   |        Version:  1.11
  layer (models, ORM)                |
               Severity:  Release    |       Keywords:  when,
  blocker                            |
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I have a strange issue with `When()` and models using UUID as their pk.

 I prepared example project here: https://github.com/dekoza/djanbug

 The `example.views.myview` includes code ported from the app I'm currently
 developing - I have several models using UUIDs as their PK and I need to
 do some annotations an aggregations with some specific cases handled with
 `Case()/When()` combo.

 Even though the db is empty on the example, the view crashes that `'1' is
 not a valid UUID.` and the only '1' is the one in `When()`

 I've also encountered issues with `Count('*', distinct=True)` but right
 now I'm trying to reproduce it on the example and will post another ticket
 when I'm done.

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

Reply via email to