Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4187

MongoDB .NET Driver Quick Tour - Query Example Consistency

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.17.0
    • Affects Version/s: None
    • Component/s: None
    • None

      The MongoDB Driver Quick Tour inserts documents with a counter field,

      // generate 100 documents with a counter ranging from 0 - 99 }}var{{ documents = Enumerable.Range(0, 100).Select(i => }}new{{ BsonDocument("counter", i));

      but then later tries to query those documents using an i field name:

      var filter = Builders<BsonDocument>.Filter.Eq("i", 71);

      Either the counter field name should be changed to i, or all the i queries (I count 14) should be changed to counter.

            Assignee:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Reporter:
            brian.leonard@mongodb.com Brian Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: