Get Comments ticket - export pipeline to JAVA throwing error in Compass

got this error while trying to export pipeline to JAVA
Unrecognized option to $lookup: let

Any clue???

[{lookup: { from: 'comments', let: {'id': '_id’},
pipeline: [
{’$match’:
{
‘$expr’:{’$eq’: [’$movie_id’,’$$id’]}
}
}
],
as:‘movie_comments’

}}]

Please try using $lookup instead of lookup.

[{ $lookup: { from: 'comments', let: {'id': '_id’},

Edit:

Also, might want to use $_id as the value in let.

 'let': { "id" : "$_id" },

Kanika

That’s right. It was typo

Also, need to uncheck little checkbox “Use Builders” in compass to generate JAVA code

1 Like

That solved my problem too, thank you for the sugestion :slight_smile: