I found that:
{ $match: { $expr: { $eq: [ ‘$_id’, ‘$$imageId’ ] } } }
does work ($$imageId is an ObjectId used in the non-simplified aggregate). Maybe the { $eq: ‘$value’ } format does not work in pipelines.
I found that:
{ $match: { $expr: { $eq: [ ‘$_id’, ‘$$imageId’ ] } } }
does work ($$imageId is an ObjectId used in the non-simplified aggregate). Maybe the { $eq: ‘$value’ } format does not work in pipelines.