{{{
class Product(Model):
properties = JSONField()
}}}
when querying with {{{Product.objects.values('properties__color')}}}, the
resulting query is {{{SELECT ("product"."properties" -> 'color') FROM
"product"}}}
However, when using the equivalent F() expression {{{product =
Product.objects.values(color=F('properties__color'))}} the resulting query
is {{{SELECT "product"."properties" AS "color" FROM "product"}}}, which
ignores part of the field name
--
Ticket URL: <https://code.djangoproject.com/ticket/30336>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => armansabyr
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30336#comment:1>
* status: assigned => closed
* resolution: => duplicate
* component: Database layer (models, ORM) => contrib.postgres
* version: 2.2 => master
* keywords: jsonfield, postgres => jsonfield, postgres, F
* type: Bug => New feature
Comment:
Duplicate of #29769.
--
Ticket URL: <https://code.djangoproject.com/ticket/30336#comment:2>