Fluent NHibernate Subclass Connectivity Issues

I have this class

public class Address:Entity {
    public virtual string Address1 { get; set; }
    public virtual string Address2 { get; set; }
    public virtual string City { get; set; }
    public virtual string State { get; set; }
    public virtual string Zip { get; set; }
    public virtual string Phone { get; set; }
    public virtual string Fax { get; set; }
    public virtual string TaxId { get; set; }
}

as a base class for

public class Location:Address {
    public virtual string OfficeHours { get; set; }
    public virtual string PatientAgeRestrictions { get; set; }
    public virtual bool WheelchairAccess { get; set; }
    public virtual string ContactPerson { get; set; }
}

Then I use this to build my circuit.

Fluently.Configure()
.Mappings(m => {
    m.AutoMappings.Add(
        AutoPersistenceModel.MapEntitiesFromAssemblyOf<Provider>()
        .Where(t => t.Namespace == "Entities")
        .ConventionDiscovery.AddFromAssemblyOf<UnderscoreIdDelimiter>()
        .WithSetup(s => {
            s.IsBaseType =
                type => type == typeof(Credentialing.Data.Entity);
        })
    );
})
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();

When I do this, the column naming conventions and table names do not apply to my location table. What am I missing?

+3
source share
1 answer

Appears fixed from version 531.

0
source

Source: https://habr.com/ru/post/1708654/


All Articles