Closed dplewis closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
b50790a
) to head (5c1e04b
). Report is 45 commits behind head on alpha.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
so the syntax is set('arr.1.name', 'Bob');
? I'd be curious if the server creates the right mongo update to support this, might be worth a integration test.
Unrelated, I noticed in one of my PRs that ObjectStateMutations.js
has a function estimateAttribute
that doesn't seem to support dot-notation at all, while the plural estimateAttributes
does (which you updated here). I couldn't find any usage of the first one, is it just dead code?
so the syntax is set('arr.1.name', 'Bob');? I'd be curious if the server creates the right mongo update to support this, might be worth a integration test.
I'm curious as well but https://github.com/parse-community/parse-server/pull/9115 will need to be merged first. I think it should work based on the tests I wrote.
estimateAttribute that doesn't seem to support dot-notation at all
I think this might be dead code, good catch
@mtrezza This is ready to merge.
🎉 This change has been released in version 5.2.0-alpha.1
🎉 This change has been released in version 5.2.0-beta.1
🎉 This change has been released in version 5.2.0
Pull Request
Issue
Using Dot notation on array fields messes up the internal state of objects. Most notably internally they are handled like objects instead of arrays. This would prevent other array operations like
add
,remove
from working. Also this may cause errors on the Server.instead of
Closes: https://github.com/parse-community/Parse-SDK-JS/pull/1343
Approach
Update ObjectStateMutation
estimateAttributes
andcommitServerChanges
.estimateAttributes
is called wheneverobj.attributes
is accessed.commitServerChanges
is called onobj.save
andobj.fetch
TODO
Tasks