How to filter by a column in a related table?
Example: list all recipes with a specific ingredient
Also, I wish to include all ingredients of each matched recipe in the response
4 Replies
An inner join?
Thanks, but inner join doesn't seem to support including the ingredients in the response.
Got it working like this:
I use a raw sql query when filtering by a related table.
Something like "where recipes.id in (select recepeId form ingredients where ingredients.name like %cheese%)"