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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4
    • Affects Version/s: 1.3.1
    • Component/s: None
    • Environment:
      Windows Server 2008, .NET 4.0

      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.

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

              Created:
              Updated:
              Resolved: