Hi

I'm working on an app which uses 2 databases. All entities are defined
in a single assembly and I've been using AutoMapping as follows

m.AutoMappings.Add(AutoMap.AssemblyOf<MyEntity>(type =>
type.Namspace.EndsWith("ConfigEntities")));

m.AutoMappings.Add(AutoMap.AssemblyOf<MyEntity>(type =>
type.Namspace.EndsWith("SystemEntities")));

when configuring a Session to the config and the system databases
respectively.

I've recent wanted to switch to fluent mappings to take a bit more
control. However there is no such type filter on FluentMappings.

So, either both sessions will use the same mappings which will break
if there are clashes with table names, or i would have to create 2 new
projects specifically to hold the mapping for the 2 databases.

I'd like to see a filter lambda as above but for FluentMappings.

m.FluentMappings.AddFromAssemblyOf<MyEntity>( type =>
type.Namspace.EndsWith("ConfigMappings") );

Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to