Hello, I've read a post on SO <http://stackoverflow.com/questions/13748919/fluent-nhibernate-map-list-of-abstract-class-with-table-per-concrete-class-uni>, but I have a case where I don't have a list so much as a HasOne.
One of my domain classes HasOne, but that one extends an abstract base class. I want the abstraction to persist to table-per-hierarchy in the usual sense, but how to persuade Fluent (and/or NHibernate) that it's okay to have the abstract base class. In the meantime, I am receiving an exception building the configuration. AbstractScheduler is appropriately abstract, protected-parameterless-ctor, should not be instantiating it. However the mapping wants a public-parameterless-ctor. Otherwise, I have mapped the derived schedulers in the usual SubclassMap sense with a discriminator value. Interested to know how to work past this sort of use case. I could set it up as a "default scheduler" in the base class, but that's not as interesting, and could lead to domain design confusion. Thank you... FluentNHibernate.Cfg.FluentConfigurationException was unhandled HResult=-2146233088 Message=An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail. Source=FluentNHibernate StackTrace: at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() at Football.Data.Repository.Hibernate.SessionFactoryConfigurator.CreateFactory() in i:\Source\Kingdom Software\Football\Simulator\Football.Data\Repository\Hibernate\SessionFactoryConfigurator.cs:line 66 at Football.Repository.SessionFactoryConfiguratorBase`1.get_Factory() in i:\Source\Kingdom Software\Football\Simulator\Football.Repository\SessionFactoryConfiguratorBase.cs:line 37 at Football.Data.RepositoryExtensionMethods.GetRepositoryForSession[TConfigurator,TRepository](TConfigurator configurator, Func`2 getter, IInterceptor sessionLocalInterceptor) in i:\Source\Kingdom Software\Football\Simulator\Football.Data\Extensions\RepositoryExtensionMethods.cs:line 26 at Football.Migrator.Program.Main(String[] args) in i:\Source\Kingdom Software\Football\Simulator\Football.Migrator\Program.cs:line 52 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: FluentNHibernate.Cfg.FluentConfigurationException HResult=-2146233088 Message=An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail. Source=FluentNHibernate StackTrace: at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() InnerException: FluentNHibernate.MissingConstructorException HResult=-2146233088 Message='Football.Data.Mappings.Schedulers.AbstractSchedulerMap, Football.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is missing a parameterless constructor. Source=FluentNHibernate StackTrace: at FluentNHibernate.Utils.Extensions.InstantiateUsingParameterlessConstructor(Type type) at FluentNHibernate.PersistenceModel.Add(Type type) at FluentNHibernate.Utils.CollectionExtensions.Each[T](IEnumerable`1 enumerable, Action`1 each) at FluentNHibernate.PersistenceModel.AddMappingsFromSource(ITypeSource source) at FluentNHibernate.PersistenceModel.AddMappingsFromAssembly(Assembly assembly) at FluentNHibernate.Cfg.FluentMappingsContainer.Apply(PersistenceModel model) at FluentNHibernate.Cfg.MappingConfiguration.Apply(Configuration cfg) at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() InnerException: -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To unsubscribe from this group and stop receiving emails from it, send an email to fluent-nhibernate+unsubscr...@googlegroups.com. To post to this group, send email to fluent-nhibernate@googlegroups.com. Visit this group at http://groups.google.com/group/fluent-nhibernate. For more options, visit https://groups.google.com/d/optout.