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

BsonTypeMapper.TryMapToBsonValue fails when passed a QueryDocument

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.6.1
    • 1.6
    • None
    • None

    Description

      To reproduce:

      var query = new QueryDocument("x", 1);
      BsonValue bsonValue;
      var ok = BsonTypeMapper.TryMapToBsonValue(query, out bsonValue);

      TryMapToBsonValue knows about the BsonDocument object model, but not about the classes derived from BsonDocument (like QueryDocument).

      There is a pull request from Oleg Kosmakov with a fix for this:

      https://github.com/mongodb/mongo-csharp-driver/pull/133

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: