-
Notifications
You must be signed in to change notification settings - Fork 117
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
fix(datastore): Update Model Class Check in getMutationForModelId() from using ModelSchema class name to mutatedItem modelName #2637
Merged
ankpshah
merged 9 commits into
main
from
bug/2608-same-primary-key-value-across-different-models-triggers-conflict
Dec 14, 2023
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…onfig - The build process will fail when versions of explicitly allowed dependencies in the license check configuration are updated. - This enforces a review of any updates in licenses before the changes can be merged. - This enforcement does not apply to dependencies with already allowed license types and is only for explicitly allowed dependencies
…g/2608-same-primary-key-value-across-different-models-triggers-conflict Merging main for latest changes
…ersistentRecords Change the model class comparison logic in `getMutationForModelId()` from using `getModelClass().getName()` to directly using `getName()`. This modification addresses an issue where requests from Flutter are encapsulated within a Serialized model. Previously, `getModelClass()` returned a fixed class name "com.amplifyframework.core.model.SerializedModel", making it impossible to differentiate between various model classes generating mutations. This update ensures accurate identification of model class involved in mutation.
…g/2608-same-primary-key-value-across-different-models-triggers-conflict Sync with main branch
ankpshah
changed the title
Bug/2608 same primary key value across different models triggers conflict
fix(datastore): Update Model Class Check in getMutationForModelId() from using ModelSchema class name to mutatedItem modelName
Nov 15, 2023
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2637 +/- ##
=======================================
Coverage 41.81% 41.81%
=======================================
Files 902 902
Lines 28996 28996
Branches 4107 4107
=======================================
+ Hits 12125 12126 +1
+ Misses 15543 15542 -1
Partials 1328 1328 |
…rent-models-triggers-conflict
…rent-models-triggers-conflict
gpanshu
approved these changes
Dec 13, 2023
…rent-models-triggers-conflict
tjleing
approved these changes
Dec 14, 2023
2 tasks
ankpshah
deleted the
bug/2608-same-primary-key-value-across-different-models-triggers-conflict
branch
December 14, 2023 16:58
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue #, if available:
#2608
Description of changes:
Change the model class comparison logic in
getMutationForModelId()
fromusing
getModelClass().getName()
to directly usinggetName()
. Thismodification addresses an issue where requests from Flutter are
encapsulated within a Serialized model. Previously,
getModelClass()
returned a fixed class name "com.amplifyframework.core.model.SerializedModel",
making it impossible to differentiate between various model classes
generating mutations. This update ensures accurate identification of
model class involved in mutation.
How did you test these changes?
(Please add a line here how the changes were tested)
Documentation update required?
General Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.