-
Notifications
You must be signed in to change notification settings - Fork 223
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
Scaffolded navigation property name no longer meaningful when using composite foreign keys #659
Comments
Could you give us an example of what the "meaningful" name would be in the composite key scenario? |
In this case the naming would optimally match the previous naming (aka the names would be unchanged) This could be pulled from the name of the foreign key, which generally follows the same naming between the two versions (stripping the fk_ and _id parts of the foreign key name) |
Naming as a combination of the two columns in the composite key would also be acceptable, though for my case I'd prefer naming based on the name of the foreign key |
This seems to be a general EF Core request/question, not related to Npgsql specifically - so it belongs in http://github.com/aspnet/EntityFrameworkCore/. |
When using single-column foreign keys, I would get navigation properties with useful names such as:
(Where
current_army
table has primary keyarmy_id
)After changing the primary keys to be composite for these tables and setting the foreign keys as composite accordingly, I get generic, uninterpretable names such as:
(Where
current_army
table has composite primary keyworld_id,army_id
)Setting the new foreign keys to have the same naming convention as the original sample (suffixed with
_id
) has no effect.The text was updated successfully, but these errors were encountered: