Skip to content

Native many-to-many relationships #935

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

Closed
bart-degreed opened this issue Jan 29, 2021 · 0 comments · Fixed by #1037
Closed

Native many-to-many relationships #935

bart-degreed opened this issue Jan 29, 2021 · 0 comments · Fixed by #1037

Comments

@bart-degreed
Copy link
Contributor

bart-degreed commented Jan 29, 2021

One of the new features in EF Core 5 is native support for many-to-many relationships without explicitly mapping the join table.

This removes the need for our HasManyThroughAttribute, which we intend to remove in the next major version. The migration for existing APIs should be easy and we can't think of any reason to keep [HasManyThrough].

Our example for self-referencing many-to-many relationships is still possible but requires somewhat special mapping (spoiler here). Other than that, we need to update our EF Core inverse navigation resolver to also capture skip-nativations (this is what many-to-many are called under the covers in EF Core), so we can filter out existing join table entries from an incoming POST to-many request.

As part of this change, we should update documentation and examples accordingly.

@bart-degreed bart-degreed added this to the Future milestone May 7, 2021
@bart-degreed bart-degreed changed the title Many-to-many relationships Native many-to-many relationships Jul 16, 2021
@bart-degreed bart-degreed mentioned this issue Jul 30, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant