-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Make SetIfDifferent
no longer check if a key is mutable.
#41
Conversation
850b84d
to
d9c44ec
Compare
SetIfDifferent("appVersion", ParseClient.PlatformHooks.AppBuildVersion); | ||
SetIfDifferent("appIdentifier", ParseClient.PlatformHooks.AppIdentifier); | ||
SetIfDifferent("appName", ParseClient.PlatformHooks.AppName); | ||
ForceSetIfDifferent("deviceType", ParseClient.PlatformHooks.DeviceType); |
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.
SetIfDifferent
will not check for mutability. https://github.com/ParsePlatform/Parse-SDK-dotNET/blob/master/Parse/ParseObject.cs#L1238
I'm not sure this is the right fix.
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.
It does check for mutability when it calls Remove
, though.I guess we can change each of these SetIfDifferentCalls
and bound them by a null check on the value, although I'm not certain that makes a ton of sense (we could end up with really stale values).
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 the correct solution for this would be to refactor SetIfDifferent
so that it also forces Remove
, and not make another ForceSetIfDifferent
. SetIfDifferent
by definition should force update.
This would cause issues when updating an installation. By forcing removal of a key using an operation, we no longer check for children who override `IsMutableForKey`. Fixes #40, and probably several others.
d9c44ec
to
6d76515
Compare
SetIfDifferent
no longer check if a key is mutable.
PR updated. |
Perfecto |
Make `SetIfDifferent` no longer check if a key is mutable.
This would cause issues when updating an installation. By forcing removal of a key using an operation, we no longer check for children who override
IsMutableForKey
.Fixes #40, and probably several others.
cc @grantland @hallucinogen