Changes between Initial Version and Version 1 of Ticket #34548


Ignore:
Timestamp:
May 8, 2023, 2:45:25 PM (17 months ago)
Author:
Michael
Comment:

code fixes

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34548 – Description

    initial v1  
    11Hello. I use Django 4.2, psycopg2 2.9.6 and postgis/postgis:15-3.3-alpine as database in my project.
    22
    3 Previously json field filtering worked as expected 'extra_data__hello="world"' returned me queryset where objects extra_data json field contained {"hello": "world"}. Now I noticed queryset is empty. After some manipulations with query it start work after adding "iexact".
     3Previously json field filtering worked as expected
     4{{{
     5extra_data__hello="world"
     6}}}
     7returned me queryset where objects extra_data json field contained {"hello": "world"}. Now I noticed queryset is empty. After some manipulations with query it start work after adding "iexact".
    48
    5 I expected if json field is {"hello": "world"}, objects.filter(extra_data__hello="world") or objects.filter(extra_data__hello=some_variable) should return this object in query set, but it doesn't work. objects.filter(extra_data__hello__iexact="world")  fix this problem.
     9I expected if json field is {"hello": "world"},
     10{{{
     11objects.filter(extra_data__hello="world")
     12}}}
     13or
     14{{{
     15objects.filter(extra_data__hello=some_variable)
     16}}}
     17should return this object in query set, but it doesn't work. objects.filter(extra_data__hello__iexact="world")  fix this problem.
    618
    719Here are queries example:
Back to Top