Amending mappings for subclass with automapping

Jon Curtis's Avatar

Jon Curtis

13 May, 2010 09:49 AM via web

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.

    Reply to this discussion

    Preview Comments are parsed with Markdown. Help with syntax

    Attached Files

      You can attach files up to 10MB

      What is 4 times four?