Closed mamigot closed 9 years ago
(Python 3.4.3, Django 1.8.2, django-pgjson0.2.3)
For a model like this:
class Result(models.Model): timestamp = models.DateTimeField(blank=True, null=True) attributes = JSONField(null=True, blank=True, default={})
I'm conducting this query (out of the docs):
Result.objects.filter(attributes__at__side="Right")
and getting this error:
FieldError: Unsupported lookup 'at' for JsonBField or join on the field not permitted.
Thank you!!
It was my fault –I had an additional underscore between "at" and "side" in the query. This works perfectly Result.objects.filter(attributes__at_side="Right")!
Result.objects.filter(attributes__at_side="Right")
(Python 3.4.3, Django 1.8.2, django-pgjson0.2.3)
For a model like this:
I'm conducting this query (out of the docs):
and getting this error:
Thank you!!