Nested where filter, how to not include empty
The following almost works
I get only those productionItems with itemStage of particular crew_id, but I also get those with no itemStage's so query result has
itemStages: []
. How do I only include if crew_id equal and productionItem has itemStage4 Replies
The
where
that you have only filters the itemStages
You need a where for the productionItems
For that to work, you either use a subquery in the where or you have to turn to the regular crud API: db.select
Not following what " use a subquery in the where " means?
Take a look at this thread: https://discord.com/channels/1043890932593987624/1166190702984708126
There are several examples in there for a very similar query
In this message is the subquery I was talking about: https://discord.com/channels/1043890932593987624/1166190702984708126/1166201121107345478
thanks, I'll take a look