Skip to content

Use output documents of a first aggregation pipeline as input for a second aggregation pipeline #14953

Closed Answered by vkarpov15
yannispgs asked this question in Q&A
Discussion options

You must be logged in to vote

@yannispgs run mongoose.connection.aggregate() not TestModel.aggregate. MongoDB only supports $documents in db-level aggregate, not collection level aggregate.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@yannispgs
Comment options

@yannispgs
Comment options

Comment options

You must be logged in to vote
2 replies
@vkarpov15
Comment options

Answer selected by yannispgs
@yannispgs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants