#32411: Case-insensitive lookups on JSONField doesn't work on MySQL.
-------------------------------------+-------------------------------------
     Reporter:  elonzh               |                    Owner:  Hasan
         Type:                       |  Ramezani
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  JSONField mysql      |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 > the problem is the authors fields is a list and Django does not support
 filter it

 That little to do with this ticket though. The ORM has no way of
 ''knowing'' `authors` is a JSON Array because `JSONField` are schema less.
 If you want to filter out papers that have at least one author with a
 matching name you'll have to use the MySQL equivalent of
 `json_array_elements` and a subquery through a `Func` expression but
 that's something you should ask about on
 [https://docs.djangoproject.com/en/3.1/faq/help/#how-do-i-do-x-why-
 doesn-t-y-work-where-can-i-go-to-get-help support channels].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32411#comment:8>
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/064.1f3b549ff15302ab16abe5fb7081370d%40djangoproject.com.

Reply via email to