jagregory/fluent-nhibernate — pull request #258 by atharaxia (2014-02-03 15:41:36+00:00)
Title: EnsureMappingsBuild is called in PersistenceModel.ImportProviders to pre...

I have to map a legacy database with the following (simplified) structure

ActiveRecord	Root Table and Class
TypeInfo	Child Table and Class with foreign key to ActiveRecord
MessageType	Class that is also mapped to the TypeInfo table

As it is not possible to mix table per subclass and table per hierarchy in one inheritance tree,
I mapped TypeInfo to a view and made it a new root table. To accomplish this, a FluentMapping was used
in addition to the other automapped tables.
With the current FNH version this causes a DuplicateMapping exception as MessageType is also mapped as joined subclass of the ActiveRecord class.
I fixed that, calling EnsureMappingsBuild in PersistenceModel.ImportProviders.
I'm not sure if this is the exactly correct place - nevertheless all existing UTs succeed.