-
Notifications
You must be signed in to change notification settings - Fork 98
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
Refactor property info handling, allow keys different from Id property #158
Draft
nseguin42
wants to merge
8
commits into
DapperLib:main
Choose a base branch
from
nseguin42:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Aug 3, 2023
-
Refactor property info handling, allow keys different from Id property
- Only treat a property named 'Id' as a key if there is no Key or ExplicitKey property. (fixes DapperLib#140) The new behavior allows manually specifying a key (or explicit key) that is different from the 'Id' property. Any usage that would previously have succeeded (not thrown an exception) is unaffected. - Introduce PropertyInfoWrapper to hold all the relevant information about a type's properties. - Move logic about selecting a key into the PropertyInfoWrapper so it can be cached as well. - Use a single ConcurrentDictionary of PropertyInfoWrappers instead of one for each type of property. Thread-safety is preserved because all mutation happens inside a thread-safe Lazy<T>. - Add `PropertyNamedId` to distinguish this property from those explicitly annotated with a `KeyAttribute`.
Configuration menu - View commit details
-
Copy full SHA for a2f53a3 - Browse repository at this point
Copy the full SHA a2f53a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e349aa9 - Browse repository at this point
Copy the full SHA e349aa9View commit details -
Fix compound keys by including the PropertyNamedId by default in KeyP…
…ropertiesCache Quick and dirty fix. Let's see if the tests pass.
Configuration menu - View commit details
-
Copy full SHA for 2e543bd - Browse repository at this point
Copy the full SHA 2e543bdView commit details -
Count the Id property as a KeyProperty again
This brings the behavior closer to current while preserving the new GetSingleKey<T> behavior. Should fix more tests.
Configuration menu - View commit details
-
Copy full SHA for c4f01c2 - Browse repository at this point
Copy the full SHA c4f01c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7178dec - Browse repository at this point
Copy the full SHA 7178decView commit details -
Configuration menu - View commit details
-
Copy full SHA for b994d63 - Browse repository at this point
Copy the full SHA b994d63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37f8593 - Browse repository at this point
Copy the full SHA 37f8593View commit details -
Configuration menu - View commit details
-
Copy full SHA for b61b06c - Browse repository at this point
Copy the full SHA b61b06cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.