Fluent mappings not picked up when mixing mapping types
When I try mixing different types of mappings, the "FluentMappings" are not picked up. Not only are the mappings not reflected in the database that I generate from the mappings, but the fluent mappings don't get exported. (Note that I export the fluent mappings to a different directory from the auto mappings.) I'm using version 1.0.0.636. Am I doing something wrong or is this a bug?
return Fluently.Configure()
.Database(persistenceConfigurer)
.Mappings(m =>
{
m.HbmMappings.AddFromAssemblyOf<PropertyMappingOverride>();
m.FluentMappings.AddFromAssemblyOf<PropertyMappingOverride>().ExportTo("C:\\Temp\\hbm\\fluent");
m.AutoMappings.Add(
model.AddEntityAssembly(typeof(EntityBase).Assembly)
.IgnoreBase<EntityBase>()
.IncludeBase<AssessedItem>()
.Where(t => t.Namespace.EndsWith("DomainModel.Entities"))
.Conventions.Add<MyIdConvention>()
.Conventions.Add<ReferenceForeignKeyConstraintConvention>()
.Conventions.Add<HasManyForeignKeyConstraintConvention>()
.Conventions.Add(ForeignKey.EndsWith("ID"), PrimaryKey.Name.Is(x => "ID"))
.Conventions.Add(DefaultCascade.All())
.UseOverridesFromAssemblyOf<PropertyMappingOverride>()
).ExportTo("C:\\Temp\\hbm\\auto");
})
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by James Gregory on 16 May, 2010 05:37 PM
Are your
ClassMap
classes public?3 Posted by MylesRip on 18 May, 2010 04:30 PM
No, they weren't. Thanks!
James Gregory closed this discussion on 18 May, 2010 04:38 PM.