So everything is working well with the basic discriminator mapping. I can interact directly with entities A and B without any problems.
public class BaseType {}
You mapping looks odd, in particular I think it should look more like this
DiscriminateSubClassesOnColumn<string>("Type")
.SubClass<EntityA>("A", m => { })
.SubClass<EntityB>("B", m => { });
Having said that it seems that method is depreciated and you should instead define the following (taken from Automapping Subclasses:
public class ParentMap : ClassMap<Parent>
{
public ParentMap()
{
Id(x => x.Id);
Map(x => x.Name);
DiscriminateSubClassesOnColumn("type");
}
}
public class ChildMap : SubclassMap<Child>
{
public ChildMap()
{
Map(x => x.AnotherProperty);
}
}
Not sure this will fix it though, I am yet to encounter your scenario.
Edit: The issue is also raised here, sounding more like a bug to me