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

Deserialization of Dictionary that was serialized with nominalType object fails due to lack of type information

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3
    • Affects Version/s: 1.1
    • Component/s: None
    • None

      Can reproduce using this class:

      public class C

      { public ObjectId Id; public object Obj; }

      and this code:

      collection.RemoveAll();
      var c = new C { Obj = new Dictionary<string, int> {

      { "a", 1 }

      };
      collection.Insert(c);

      var r = collection.FindOneAs<C>(); // fails

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

              Created:
              Updated:
              Resolved: