Sorry I haven't used the JSONField myself before.
On Tue, Jul 26, 2022 at 5:01 PM Sencer Hamarat
wrote:
> Thanks Ross,
> Very appreciated.
> That's what I need.
>
> I'm also having a problem with this query after I implemented the solution:
>
> I believe,
>
Thanks Ross,
Very appreciated.
That's what I need.
I'm also having a problem with this query after I implemented the solution:
I believe,
Q(bundle__contains=OuterRef("book_id"))
part of the query is expecting an array instead of direct value.
I'm getting this error:
ProgrammingError: operator
https://docs.djangoproject.com/en/4.0/ref/models/expressions/#django.db.models.OuterRef
On Tue, Jul 26, 2022 at 4:27 PM Sencer Hamarat
wrote:
> Hi,
>
> I need to pass the parent query book_id value into the subquery.
> Here is the model and the current state of the query I reached.
>
> class
Hi,
I need to pass the parent query book_id value into the subquery.
Here is the model and the current state of the query I reached.
class Publisher(models.Model):
book = models.ForeignKey(Book)
bundle = models.JSONField()
current_sales_count_query = Publisher.objects.filter(
4 matches
Mail list logo