IList<> property in abstract class is not mapping to concrete classes but all the other properties are.

Bill's Avatar

Bill

11 Aug, 2010 03:44 PM via web

I have a base abstract class that has several common properties to be used in all derived classes. The two bool properties map as expected but the IList AuditDetails property does not.

For a test, I added an AuditDetail AuditDetail property and it maps as expected in the generated HBMs and Schema Export (many-to-one with a FK).

In my AutomappingConfiguration, the ShouldMap(Member member) always returns true for the AuditDetails property in each concrete class that is being mapped. The IsDiscriminated(Type type) method always returns false (table per subclass). The ShouldMap(Type type) returns false for the base abstract class which is what I want.

Will I have to do something different to get the IList AuditDetails to map in each derived class? Any help will be greatly appreciated.

Thanks!

    Reply to this discussion

    Preview Comments are parsed with Markdown. Help with syntax

    Attached Files

      You can attach files up to 10MB

      What day comes after Monday?