Changes between Version 1 and Version 2 of Ticket #26511, comment 3
- Timestamp:
- Apr 16, 2016, 11:29:04 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26511, comment 3
v1 v2 1 1 As Claude pointed out the `textfield__contains` and `jsonfield__contains` lookups do not behave the same. 2 2 3 In order to use the `textfield__contains` operator on `metadata -> 'title'` fieldyou'll have to cast your JSON field to text (just like you do in your `raw()` query) before hand.3 In order to use the `textfield__contains` operator on `metadata -> 'title'` you'll have to cast your JSON field to text (just like you do in your `raw()` query) before hand. 4 4 5 5 The following should work against the master branch (which introduced the `Cast` [https://docs.djangoproject.com/en/dev/ref/models/database-functions/#cast function]):