SetIdMember call being ignored.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.2.3
    • Component/s: BSON, Serialization
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: