Skip to content

EnsureMappingsBuild is called in PersistenceModel.ImportProviders to pre... #258

Open
wants to merge 1 commit into from

1 participant

@atharaxia

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.

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.