Mapping of subclass members doesn't work

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Windows
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Consider this mapping of a subclass that has a property that I want ignored:

      mapping.DefaultProfile(profile =>

      { profile.SubClassesAre(t => t.IsSubclassOf(typeof(MyAbstract))); }

      );
      mapping.Map<MyConcrete>(c =>

      { c.Member(x => x.MyProperty).Ignore(); }

      );

      The MyProperty of MyConcrete (which is a subclass of MyAbstract) doesn´t get ignored until I add this:

      mapping.Map<MyAbstract>(f =>

      { f.Member(x => x.MyProperty).Ignore(); }

      );

      This is works for my case but I can foresee cases where I would want one concrete class to ignore this property of the abstract while I would want to include it in another.

            Assignee:
            Craig Wilson
            Reporter:
            nisbus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: