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

Error fetching meta data because a data property cannot have more than one RelatedNavigationProperty #53

Open
boone34 opened this issue Apr 9, 2022 · 0 comments

Comments

@boone34
Copy link

boone34 commented Apr 9, 2022

I have a model where I get a Cannot reset a RelatedNavigationProperty once its set exception on fetching metadata.

This is being caused because my model has foreign keys that reference more than one parent entity. While this is not possible at the database level between tables, it is possible at the database level between one table, one other table and any number of views witch include the other table and its key. It is also possible in domain models and is supported by both EF 6 and EF Core.

Consider the following:

image

Here SubJobCrew.SubJobKey is a foreign key to both SubJob and SubJobUi. In the database SubJobUi is a view which includes the table SubJob and its key.

Anyway this could be addressed?

Thx

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

No branches or pull requests

1 participant