Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atharaxia
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant