-
Notifications
You must be signed in to change notification settings - Fork 32
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
"Object reference not set to an instance of an object" within OeEfCoreEdmModelMetadataProvider.GetForeignKey #16
Comments
Please send project reproduce error or sample DbContext |
@voronov-maxim Thanks for the quick reply. When I try to load my full context I receive this (which has around 100 models). I was able to load just 2 models without issue (at least to be able to come across #17). Let me try to deduce which model(s) of the 100 might be the issue when I'll report back how it's configured. Might be a day or two before I can work it out. Thanks |
@voronov-maxim Initially I found the issue is due to missing mappings in my model that do not appear to be handled gracefully when not found. For example in OeEfCoreEdmModelMetadataProvider if I don't know if these could simply be I'm still digging in to get my full list of I'll try to provide a simple model example once I fully understand the problem, but if you have any thoughts on how to provide better logging I would greatly appreciate it. |
If EF build valid model from entity with invalid navigation property, then also need ignored this property |
@voronov-maxim see previous comment, I couldn't find a way to re-open the issue now that I have an example model |
@voronov-maxim thanks, could you cut a NuGet release that includes this fix? |
I'm attempting to migrate from
Microsoft.AspNetCore.OData
toOdataToEntity
but I'm receiving the following exception duringdataAdapter.BuildEdmModelFromEfCoreModel()
witihin OeEfCoreEdmModelMetadataProvider.GetForeignKey() when I added my relatively complex DbContext/Models (same one I'm currently using withMicrosoft.AspNetCore.OData
)The text was updated successfully, but these errors were encountered: