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

Deserialization discriminators are too lazy

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • None
    • None
    • None

    Description

      Long story short, this works:
      Foo ret = new Foo();
      Trace.TraceInformation("Doing stuff to

      {0}

      .", ret.ToJson());
      ret = collection.FindOneAs<Event>(someQuery);
      return ret;

      Take away the ToJson() call it breaks because BsonClassMap.AutoMap() does not get called which causes BsonClassMap.LookupActualType() to fail. I am not sure how to fix.

      Let me know if you need a better description and I can provide one.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: