-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Prevent unchanged keys from being dirty
#7591
Comments
Thanks for opening this issue!
|
In which other scenarios does this issue occur, other than when using the Parse Swift SDK? |
It also happens if you call Similar examples are calling I think if you use |
I can see scenarios in which writing a variable can trigger a script on the DB level, even if it is an unchanged value. Without evaluating these scenarios, changing the current behavior would be a breaking change, and if we decide to change it, it would have to be phased in. Not sure whether we need to change this, because it could easily be argued that it is a developer's responsibility to not set a user's email address if the current email address is the same. For developers who are not playing in the above mentioned scenarios there is no point in doing so. It is also bad practice, because if the server determined that a key should not be set or a If the server starts to overrule a decision that the developer made by calling
|
You’re right, good points. I was just looking at a server side solution to the Swift issue that can’t be fixed, but I guess this isn’t it. Thanks! |
New Feature / Enhancement Checklist
Current Limitation
As discussed here, with the way Parse Swift handles
structs
, all keys are marked as.dirty
in a beforeSave trigger, calling unnecessary database writes.Feature / Enhancement Description
For efficiency, database writes should only happen if keys are updated.
Example Use Case
Updating certain keys from the ParseSwift SDK
Alternatives / Workarounds
Add a beforeSave trigger to every class to revert any unchanged keys.
3rd Party References
The text was updated successfully, but these errors were encountered: