Foreign keys removed from owned tables when excludedFromMigrations set to true #23137
Labels
area-migrations
area-model-building
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
Servicing-approved
type-bug
Milestone
Repo to view and reproduce error.
https://github.com/OliDow/EFToolingExcludeFromMigrationsIssue
First issue
If you are working on a project that deals with a owned relationship but you are not the service that is in charge of the tables you will set excludefrommigrations as true. However this does not work as intended, it will remove all of the foreign keys related to that relationship and then not readd them again.
Second issue
When creating migrations on owned relationships the tooling will add a line trying to call a method that doesn't exist to each entity, currently this will need updating manually in both the migration file and the snapshot file
Attached Repository should demonstrate both of these issues
The text was updated successfully, but these errors were encountered: