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

Foreign Key Problems #72

Closed
michaelvilarino opened this issue Sep 1, 2017 · 2 comments
Closed

Foreign Key Problems #72

michaelvilarino opened this issue Sep 1, 2017 · 2 comments
Assignees
Milestone

Comments

@michaelvilarino
Copy link

I'm having trouble working with a foreign key.

inside a class, I need to put the name of a property + "Id" so that it is recognized as foreign key.

This is not legal ..

Would not it be better to specify a foreign key at the time of mapping?

For example:

ToTable ("Component");
Map (m => m.Id) .Iskey ();
Map (m => Description);
Map (m => m.Product) .IsForeignKey (); // Suggestion

@henkmollema henkmollema mentioned this issue Mar 21, 2018
Closed
16 tasks
@henkmollema
Copy link
Owner

Dommel v2 will support the [ForeignKey] attribute which allows you to specify the property name of the foreign key.

@henkmollema henkmollema added this to the v2 milestone Mar 21, 2018
@henkmollema henkmollema self-assigned this Mar 21, 2018
@MichaelRodrigueess0s1
Copy link

how i'm use the ForeignKey attribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants