I have the model
class Product(Model):
properties = JSONField()
When querying
Product.objects.values('properties__color')
i'm getting the correct result
SELECT product.properties->color FROM product
However, when I'm doing what I thought to be equivalent
Product.objects.values(color=F('properties__color'))
the query that's executed is completely different
SELECT product.properties AS color FROM product
Is this a bug of django's JSONField, or have I misunderstood F()
expressions?