Problem Statement:
While using aggregation pipeline on collection having DBRef to other collection, using $lookup does not resolve to va...
For further actions, you may consider blocking this person and/or reporting abuse
Very helpful article!
There is a missing $ from the snippet below. It took me hours to figure it out.
{
$addFields: {
"author": {
$arrayElemAt: [{ $objectToArray: "$author" }, 1]
}
}
},
{
$addFields: {
"author": "$author.v"
}
}
yeah i avoid dbref like the plague 🤪
Useful! You Save my time
Thank you
Very helpful. The explanation was spot on and brilliant. Thanks !