MongoError: from not allowed

Hi,

In the Ticket: Get Comments test I am getting the error:

    Something went wrong in getMovieByID: MongoError: from is not allowed in this atlas tier

That sounds like I can’t do this operation/ticket/function from a free cluster.

Can’t be right, can it?

Here is code:
const pipeline = [
{
match: { _id: ObjectId(id) } } , { 'from': 'comments', 'let': { 'id': '_id’
},
‘pipeline’: [
{
‘$match’: {
‘$expr’: {
‘$eq’: [
‘$movie_id’, ‘$$id’
]
}
}
}, {
‘$sort’: {
‘date’: 1
}
}
],
‘as’: ‘movie_comments’
}
]

1 Like

Please verify your syntax. You are missing dollar sign for the first match stage. And from is not a valid stage. The correct stage is probably some form of lookup.

2 Likes