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

Allowed user to override conventions for primary key #72

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Wayne-Mather
Copy link

Previously the code was check for property called id and assume thats the primary key, or find the data annotation [Key].

If the user does not have any of those the application failed. This now allows a convention to be created out-of-the-box and the user to override that convention if necessary.

It also changes the order so if there is a [Key] annotation, that is used by default.

…n [Key] annotation or id as the name

Reflection for property is case insensitive, so don't need Id twice
…ions_and_overrides' into features/add_primary_key_conventions_and_overrides
@Wayne-Mather Wayne-Mather reopened this Aug 22, 2022
@Wayne-Mather
Copy link
Author

Well the squash didn't go so well in clearing up the commit history. Not a git guru by any means so I don't use rebase as I often get it wrong

@verbedr
Copy link
Contributor

verbedr commented Nov 9, 2022

Hi @Wayne-Mather not sure what you think went wrong. But usually when you use rebase -i and changed the commit history. You need to push --force those changes otherwise it will try to sync the history and probably create some duplicates. If this is stating the obvious, just ignore this.

ps don't be afraid to lose things in git all commits are still there and can be found back with git reflog.

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

Successfully merging this pull request may close these issues.

2 participants