#27693: Case insensitive lookups on JSONField nested values
----------------------------------+--------------------------------------
     Reporter:  Harris Lapiroff   |                    Owner:  (none)
         Type:  New feature       |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.10
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------

Comment (by melinath):

 Just tested this on master, and I can confirm that the iexact lookup works
 - except that you need to add the quotes for the query in yourself. i.e.

 {{{
 >>> x = OrganizationPerson.objects.first()
 >>> x.data
 {'field2': 'Ethelfort'}
 >>> OrganizationPerson.objects.filter(data__field2__iexact='Ethelfort')
 <QuerySet []>
 >>> OrganizationPerson.objects.filter(data__field2__iexact='"Ethelfort"')
 <QuerySet [<OrganizationPerson: OrganizationPerson object>]>
 }}}

 Knowing how the SQL ends up looking, this sort of makes sense to me - but
 if I didn't know that from this ticket I would be completely lost.

--
Ticket URL: <https://code.djangoproject.com/ticket/27693#comment:2>
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/072.4791a35fda7a61dea392b2c20c19cc2e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to