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

RevEng: Should we always specify .ForeignKey(...) when configuring relatioships #1937

Closed
rowanmiller opened this issue Mar 27, 2015 · 2 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-unknown
Milestone

Comments

@rowanmiller
Copy link
Contributor

Currently we don't specify the FK properties (which is OK because we would generate ones that match convention). However, I think it would be clearer if we just completely specified the relationship.

entity.Reference(d => d.Category).InverseCollection(p => p.Product);

Would become

entity.Reference(d => d.Category).InverseCollection(p => p.Product).ForeignKey(d => d.CategoryId);

@divega @anpete @ajcvickers @bricelam thoughts?

@bricelam
Copy link
Contributor

It would make it easier to rename the navigation properties on the dependent entity type...

@lajones
Copy link
Contributor

lajones commented Apr 2, 2015

Fixed by PR #1968

@lajones lajones closed this as completed Apr 2, 2015
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-beta4, 1.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-unknown
Projects
None yet
Development

No branches or pull requests

4 participants