You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the error when I passed the $filter array into the aggregateDocumentsByFilter function. However, I didn't get error when I declared the $filter inside of the aggregateDocumentsByFilter function. (It might be the '$' issue)
I got the error when I passed the $filter array into the aggregateDocumentsByFilter function. However, I didn't get error when I declared the $filter inside of the aggregateDocumentsByFilter function. (It might be the '$' issue)
** $filter = [
['$match' => ['Id' => ['$eq' => $id]]],
];
// Error
public function aggregateDocumentsByFilter($collection, $filter)
{
$cursor = $collection->aggregate($filter);
}
// No Error
public function aggregateDocumentsByFilter($collection, $id)
{
$filter = [
['$match' => ['Id' => ['$eq' => $id]]],
];
}**
The text was updated successfully, but these errors were encountered: