Skip to content

InvalidOperationException if a context has foreign keys upon multiple columns #25

@Pankraty

Description

@Pankraty

Hi!

I tried to connect this library to the project I work on but found the issue which makes it impossible for us to use it because it throws InvalidOperationException on initialization. The investigation shows that the reason is that some of the foreign keys we have been set upon multiple columns, while LazyEntityGraph expect there is alwas a single one:

IPropertyBase fkPrincipalProp = fkProp.PrincipalKey.Properties.Single();
var foreignKeyPropInfo = fkProp.Properties.Single().PropertyInfo;

Here I came up with the test reproducing the issue and I was hoping I'll be able to fix it myself and submit a pull request but it seems, this can be more tricky that I can handle.

@dbroudy do you maybe have an idea about how this can be fixed?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions