mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-07-03 17:22:33 +00:00
Fix aggregation pipeline match step
This commit is contained in:
@@ -111,7 +111,7 @@ func (d *Database) createAggregateLoad(target interface{}, composed *query.Query
|
|||||||
pipeline := primitive.A{}
|
pipeline := primitive.A{}
|
||||||
|
|
||||||
if !composed.Empty() {
|
if !composed.Empty() {
|
||||||
pipeline = append(pipeline, primitive.M{"$match": primitive.M{"$expr": composed.M()}})
|
pipeline = append(pipeline, primitive.M{"$match": composed.M()})
|
||||||
}
|
}
|
||||||
if composed.Sorter() != nil {
|
if composed.Sorter() != nil {
|
||||||
pipeline = append(pipeline, primitive.M{"$sort": composed.Sorter()})
|
pipeline = append(pipeline, primitive.M{"$sort": composed.Sorter()})
|
||||||
|
|||||||
Reference in New Issue
Block a user