Turns out the error was due to the base class being abstract. Kind of obvious really.
The reason the one map worked, but not the other was because of the order of the fields. The first field to be mapped on the InvestorModel
was a field defined in InvestorModel
so the mapper knew which class to instantiate. On the AgentModel
map the first field was defined on the abstract class EntityModel
so the mapper tried to instantiate that class, but failed, it didn't matter that I have chosen AgentModel
as the destination.