Nested where filter, how to not include empty

The following almost works
const query = db.query.productionItem.findMany({
  with: {
    itemStages: {
      where: eq(itemStage.crew_id, input.crew_id),
    },
  },
});

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 itemStage
Was this page helpful?