Replies: 1 comment
-
| You can't mix the query builder and raw aggregation. An aggregation builder will be created to solve this issue. The current way to use custom aggregation is like this: use MongoDB\Collection;
$builder->raw(function (Collection $collection) {
    return $collection->aggregate($pipeline, $options);
}); | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry if I missed answer somewhere, but I cant solve one issue...
I build query from many filters and I need to get count of documents distincted by two columns. Distinct and group by seems not working... With raw aggregation I get what i need, but question is how to build aggregation if my $match stage is build with
BuilderBeta Was this translation helpful? Give feedback.
All reactions