Skip to content

Problem with conventions when combining AutoMap and Fluent mappings #207

Open
ajoka opened this Issue Feb 18, 2013 · 0 comments

1 participant

@ajoka
ajoka commented Feb 18, 2013

Ive tried to combine auto-mapping with fluent mapping and hbm.xml

Ive added the same conventions for the autoMAp as for the fluent.
Everyting was ok.
If I removed the conventions from the AutoMap part, the conventions were not applied for the Fluent either.

_configuration = Fluently.Configure()
.Database(persistenceConfigurer)
.Mappings(m =>
{
m.AutoMappings.Add(
AutoMap.AssemblyOf(new AutoMappingConfiguration())
.Conventions.AddFromAssemblyOf()
// If you ommit conventions here, .FluentMappings.Conventions won't work either!
);
m.FluentMappings.Conventions.AddFromAssemblyOf(); m.FluentMappings.AddFromAssemblyOf();
m.HbmMappings.AddFromAssemblyOf();
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.