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.
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 undefined behaviour in backing store #1558
Fix undefined behaviour in backing store #1558
Changes from 12 commits
51809fa
71aab44
8e9d051
9414f6f
a03bdd8
90c576c
5fe4b45
f859bf5
fe63563
b337cbe
0c19f7a
0e73c97
f23d504
bb43852
0155fb9
36083aa
cde4c39
70bc888
631f1cf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this we may need to handle the case for maps in separately as this may be an incorrect assumption for them.
Since
getObjectArrayFromCollectionWrapper
will also unwrap the values of a map as an array, the key values pairs in the map are not guaranteed to have the same type. A map i.e. additionalData can have primitives and complex backed models too..There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar concern here, the cast will most likely fail if we called
getObjectArrayFromCollectionWrapper
on a map that has mixed types and the first item happened to be a backed model.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this. Made these updates & added tests.
Tests also exposed a bug where we now need to propagate
returnOnlyChangedValues
to nestedBackedModels
to ensure nested models with collection properties are checked. We have limited the collection checks to happen during enumeration only when we want to return changed values.