Changes between Initial Version and Version 1 of Ticket #27824


Ignore:
Timestamp:
Feb 8, 2017, 9:47:11 AM (8 years ago)
Author:
Aymeric Augustin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27824 – Description

    initial v1  
    11With the following model:
    22
    3 ```
     3{{{
    44from django.contrib.postgres.fields import JSONField
    55from django.db import models
     
    88class Subscription(models.Model):
    99    inputs = JSONField()
    10 ```
     10}}}
    1111
    1212I'd like this query to work (assuming a inputs look like `{'first_name': '...'}`:
    1313
    14 ```
     14{{{
    1515Subscription.objects.filter(inputs__first_name__unaccent__icontains="...")
    16 ```
     16}}}
    1717
    1818But it fails with:
    1919
    20 ```
     20{{{
    2121django.db.utils.ProgrammingError: operator does not exist: jsonb #> text
    2222LINE 1: ...%' OR UPPER("subscriptions_subscription"."inputs" #> ARRAY['...
    2323                                                             ^
    2424HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
    25 ```
     25}}}
    2626
    2727cecef94275118dc49a1b0d89d3ca9734e2ec9776 registered a bunch of lookups for chaining after a key transform, but unaccent wasn't included. I suggest to include it as well.
Back to Top