Allow fromJSON to set keys to dirty#1295
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1295 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 59 59
Lines 5792 5794 +2
Branches 1301 1302 +1
=========================================
+ Hits 5792 5794 +2
Continue to review full report at Codecov.
|
dplewis
left a comment
There was a problem hiding this comment.
Nice! I remember this being an issue a while ago.
|
Why is it I cannot find the changes in the latest version |
|
@ChinaeduPascal This may be just a TypeScript issue. I suggest you look into the SDK code and whether the feature has been removed again. The tests in |
|
@mtrezza You are right. The @types/parse definitions are not up-to-date. That's why I won't see the changes. |
Currently, there is no way to save fields to a Parse.Object using
fromJSON, asdirtyKeysdoesn't get set.This can be confusing as at first glance, you would expect the keys to be set as they are defined. However, after the object is fetched, the keys will be null.
This PR allows a 3rd parameter to
fromJSON, where you can specify whether the keys should be set to dirty.Properly closes #161 and #482