D
D
Denis Sokolov2022-04-07 20:38:43
MongoDB
Denis Sokolov, 2022-04-07 20:38:43

Why notfound?

Why does it give "Not found" with such settings. I want answer not to be shown

options := options.FindOne().SetProjection(bson.M{
    "tasks": bson.M{
      "description": 1,
      "answer":      0, // если тут стоит 1 до все ок
      "balls":       1,
    },
  })

The db structure is like this
"tasks": [
    {
        "description":"test description",
        "answer":"test answer",
        "balls":10
    }
]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question