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

MongoDB .NET Driver Quick Tour - Query Example Consistency

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 2.17.0
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: