I'm having a problem with this query:
I believe,
Q(bundle__contains=OuterRef("book_id"))
part of the query is expecting an array instead of single value.
I'm getting this error:
ProgrammingError: operator does not exist: jsonb @> bigint
LINE 1: ...lisher"."book_id") OR U0."bundle" @> ("publisher_...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
Is there a way to handle this error? How can I cast the value into an array within the query?