Changes between Initial Version and Version 1 of Ticket #34548
- Timestamp:
- May 8, 2023, 2:45:25 PM (20 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34548 – Description
initial v1 1 1 Hello. I use Django 4.2, psycopg2 2.9.6 and postgis/postgis:15-3.3-alpine as database in my project. 2 2 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". 3 Previously json field filtering worked as expected 4 {{{ 5 extra_data__hello="world" 6 }}} 7 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". 4 8 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. 9 I expected if json field is {"hello": "world"}, 10 {{{ 11 objects.filter(extra_data__hello="world") 12 }}} 13 or 14 {{{ 15 objects.filter(extra_data__hello=some_variable) 16 }}} 17 should return this object in query set, but it doesn't work. objects.filter(extra_data__hello__iexact="world") fix this problem. 6 18 7 19 Here are queries example: