Changes between Initial Version and Version 1 of Ticket #27824
- Timestamp:
- Feb 8, 2017, 9:47:11 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27824 – Description
initial v1 1 1 With the following model: 2 2 3 ``` 3 {{{ 4 4 from django.contrib.postgres.fields import JSONField 5 5 from django.db import models … … 8 8 class Subscription(models.Model): 9 9 inputs = JSONField() 10 ``` 10 }}} 11 11 12 12 I'd like this query to work (assuming a inputs look like `{'first_name': '...'}`: 13 13 14 ``` 14 {{{ 15 15 Subscription.objects.filter(inputs__first_name__unaccent__icontains="...") 16 ``` 16 }}} 17 17 18 18 But it fails with: 19 19 20 ``` 20 {{{ 21 21 django.db.utils.ProgrammingError: operator does not exist: jsonb #> text 22 22 LINE 1: ...%' OR UPPER("subscriptions_subscription"."inputs" #> ARRAY['... 23 23 ^ 24 24 HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. 25 ``` 25 }}} 26 26 27 27 cecef94275118dc49a1b0d89d3ca9734e2ec9776 registered a bunch of lookups for chaining after a key transform, but unaccent wasn't included. I suggest to include it as well.