Amending mappings for subclass with automapping
I am trying to automap an inheritance structure with a discriminator column (table per class). I have the strategy and column setup ok using:
.Setup(x => x.SubclassStrategy = y => SubclassStrategy.Subclass) .Setup(x => x.DiscriminatorColumn = y => "ListType")
What I now need to do is control the mappings of the subclasses. Specifically, the subclass has a collection where I need to change the foreign key column. I have tried using IAutoMappingOverride<>, but this doesn't work. How can I do this?
Also, how come you have to set the discriminator as above? With IAutoMappingOverride<> you have the option of setting DiscriminateSubClassesOnColumn. This doesn't seem to do anything.