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

ModelValidator: Throw for unmapped initialized collection navigation #21868

Merged
1 commit merged into from
Jul 31, 2020

Conversation

smitpatel
Copy link
Member

We were not checking collection navigations which are initialized inline and without setter.
This worked fine for most part as

  • One sided collection were always added by convention
  • When there were multiple pairs and convention failed, opposite side had reference navigation which would end up throwing
  • Many to Many brings a twist that there is no reference on other side so in case we fail to add many to many skip navigations by convention, we would not throw.

@ghost
Copy link

ghost commented Jul 30, 2020

Hello @smitpatel!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

We were not checking collection navigations which are initialized inline and without setter.
This worked fine for most part as
- One sided collection were always added by convention
- When there were multiple pairs and convention failed, opposite side had reference navigation which would end up throwing
- Many to Many brings a twist that there is no reference on other side so in case we fail to add many to many skip navigations by convention, we would not throw.
@smitpatel
Copy link
Member Author

/azp run

1 similar comment
@smitpatel
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ghost ghost merged commit d3d97c4 into main Jul 31, 2020
@ghost ghost deleted the smit/throwcorrectly branch July 31, 2020 05:04
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants