Closed
Description
Hi,
The following aggregation is not working:
let aggregation = [
{
match: {
lastSeenDate: { $lte: date }
}
},
{
lookup:{
from: "_User",
localField: "userId",
foreignField: "_id",
as: "user"
}
},
{
unwind: {
path: "$user"
}
},
{
lookup: {
from: "Closet",
localField: "ownerId",
foreignField: "user._id",
as: "closet"
}
},
{
unwind: {
path: "$closet"
}
},
{
limit: 10
}
];
If I remove one of the lookups from the aggregation it works as expected but it doesn't work if I add another lookup to the query.
I tried to use the same aggregation in a MongoDB GUI client (3T Studio) and there it works well.
I wanted to know if there is a limitation to one lookup only?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels