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

Overridden virtual properties are serialized even if the overriding property has the BsonIgnoreAttribute

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.4
    • 1.3.1
    • None
    • Windows Server 2008, .NET 4.0

    Description

      public class BaseClass
      {
      public virtual object Property

      {get;set;}
      }

      public class DerivedClass : BaseClass
      {
      [BsonIgnore]
      public override object Property {get;set;}

      }

      When saving an instance of DerivedClass, Property will still be serialized to the database.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            joe.enzminger Joe Enzminger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: