Open
Description
After Upgrading from FNH 1.2 to 1.3 my project threw some runtime exceptions. It turned out that fnh 1.3 tries to map a private nested class. Is this intended behaviour or a bug?
I fixed the problem within the AutomappingConfiguration (checking for IsPublic).
public class AutomappingConfiguration : DefaultAutomappingConfiguration
{
public override bool ShouldMap(Type type)
{
return type.IsPublic && type.IsSubclassOf(typeof(ModelBase));
}
}
Simplified class-setup:
public class MappedClass : ModelBase
{
}
public class NotMappedClass
{
private class WhyDoesThisClassGetsMapped : MappedClass
{
}
}