Details
-
Task
-
Resolution: Works as Designed
-
Minor - P4
-
None
-
None
-
None
-
None
Description
I want use find with OptSort but this does not work as expected.
I want do the following in my golang application
db.getCollection('materialflow').find({station:1}).sort({outgoingtime:1}) |
When I create my options instancen with
sort, _ := mongo.Options{}.Sort(bson.NewDocument(bson.EC.Int32("station", 1))) |
cursor, err := coll.Find(context.Background(), bson.NewDocument(bson.EC.String(key, id)), sort)
|
the find method returns 0 results.
Am I using this wrong?