nestedSelect
Returns a new Kysely SelectQueryBuilder instance to be used in a sub-query.
const userRatingsForRecipesInMenu = user
.associationQuery('userRecipeRatings', {
and: { recipeId: menu.associationQuery('recipes').nestedSelect('id') },
})
.all()