[Answer]-Django QuerySet changing IN to ANY(array[…])

1👍

Could possibly be done like this:

Model.objects.extra(
    where=['"rel_id" = ANY(array%s)' % (str(your_list))]
)

otherwise you probably have to resort to using raw.

👤rinti

Leave a comment