John Carruthers February 2016

Table per type in fluent nhibernate using IAutoMappingOverride

Is it possible to create a Table Per Type mapping using fluent nhibernate with only the IAutoMappingOverride interface? I really want to avoid writing out a full mapping for my models.

Answers


Firo February 2016

Not using IAutomappingOverride but with AutomappingConfiguration

class MyAutomappingConfiguration : DefaultAutomappingConfiguration
{
    public override bool IsDiscriminated(Type type)
    {
        return false; // or whatever classes it should discriminate instead of table per type
    }
}

Post Status

Asked in February 2016
Viewed 1,472 times
Voted 4
Answered 1 times

Search




Leave an answer