I figured I could find answer to this on the internet somewhere, but I seem to have missed it. You can query a table for all rows where an array column contains a specific value:
MyModel.query.filter(Mymodel.arrayField.contains(['someValue'])
And you can put in multiple values such that the array must contain all the specified values:
MyModel.query.filter(Mymodel.arrayField.contains(['someValue', 'anotherValue'])
But what about querying and where the array contains at-least one of the specified values. That is, a query that would return rows where arrayField contains 'someValue' or 'anotherValue', and maybe both but not necessarily both.
How would I do that?