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

SetIdMember call being ignored.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.2.3
    • BSON, Serialization
    • None

    Description

      I have code that used to work and has stopped. The code defines a member of a base class as the "ID" via the usual pattern.

      BsonClassMap.RegisterClassMap<Message>(cm =>

      { cm.AutoMap(); cm.SetIdMember(cm.GetMemberMap(c => c.UniqueId)); }

      );

      where UniqueID is a GUID.

      I Dropped the collection containing this type ( and its decendents) and reinstered an instance of a derived class.

      The database after the insert has an _id with an ObjectId in it !! A subsequent deserialize fails trying to make objectid into guid.

      Any thoughts on what I could have done to break this.

      Attachments

        Activity

          People

            Unassigned Unassigned
            weidson William Eidson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: