﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27824	Cannot chain unaccent transform with key lookup in Postgres JSON field.	Aymeric Augustin	Simon Charette	"With the following model:

{{{
from django.contrib.postgres.fields import JSONField
from django.db import models


class Subscription(models.Model):
    inputs = JSONField()
}}}

I'd like this query to work (assuming a inputs look like `{'first_name': '...'}`:

{{{
Subscription.objects.filter(inputs__first_name__unaccent__icontains=""..."")
}}}

But it fails with:

{{{
django.db.utils.ProgrammingError: operator does not exist: jsonb #> text
LINE 1: ...%' OR UPPER(""subscriptions_subscription"".""inputs"" #> ARRAY['...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
}}}

cecef94275118dc49a1b0d89d3ca9734e2ec9776 registered a bunch of lookups for chaining after a key transform, but unaccent wasn't included. I suggest to include it as well."	New feature	closed	contrib.postgres	dev	Normal	duplicate		Simon Charette olau@…	Accepted	0	0	0	0	0	0
