Subclass of BsonDocument is not getting serialized

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.2.3
    • Component/s: Serialization
    • Environment:
      Windows 7 64 bit with C# driver 2.2.3 and MongoDB 3.2.3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I have created a subclass from BsonDocument as below

      public class MyClassDocument : BsonDocument
      {

      }

      But, MyClassDocument class is not getting serialized while making calls to any of the API methods,

      Error Message:
      MongoDB.Driver.MongoCommandException: Command insert failed: error parsing element 0 of field documents :: caused by :: wrong type for '0' field, expected object, found 0: [ {}, {} ]

            Assignee:
            Robert Stam
            Reporter:
            Rajesh Reddy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: