-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
feat: Support dot notation on array fields #2120
Conversation
Thanks for opening this pull request! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## alpha #2120 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 61 64 +3
Lines 6186 6364 +178
Branches 1499 1514 +15
==========================================
+ Hits 6186 6364 +178 ☔ View full report in Codecov by Sentry. |
so the syntax is Unrelated, I noticed in one of my PRs that |
I'm curious as well but parse-community/parse-server#9115 will need to be merged first. I think it should work based on the tests I wrote.
I think this might be dead code, good catch |
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.
Is this PR ready for merge?
@mtrezza This is ready to merge. |
# [5.2.0-alpha.1](5.1.1-alpha.1...5.2.0-alpha.1) (2024-05-17) ### Features * Support dot notation on array fields ([#2120](#2120)) ([25ec684](25ec684))
🎉 This change has been released in version 5.2.0-alpha.1 |
# [5.2.0-beta.1](5.1.0...5.2.0-beta.1) (2024-06-24) ### Bug Fixes * `LiveQueryClient.resubscribe` with Parse Server 7 causes many open connections ([#2184](#2184)) ([71b4d17](71b4d17)) * `Parse.Installation` not working when installation is deleted on server ([#2126](#2126)) ([22360b4](22360b4)) * Duplicate pending operations on nested fields ([#2162](#2162)) ([df6df7c](df6df7c)) ### Features * Support dot notation on array fields ([#2120](#2120)) ([25ec684](25ec684))
🎉 This change has been released in version 5.2.0-beta.1 |
# [5.2.0](5.1.0...5.2.0) (2024-06-29) ### Bug Fixes * `LiveQueryClient.resubscribe` with Parse Server 7 causes many open connections ([#2184](#2184)) ([71b4d17](71b4d17)) * `Parse.Installation` not working when installation is deleted on server ([#2126](#2126)) ([22360b4](22360b4)) * Dot notation on JSON arrays doesn't work on `PushStatus` offset fields ([#2194](#2194)) ([e0eb6f0](e0eb6f0)) * Duplicate pending operations on nested fields ([#2162](#2162)) ([df6df7c](df6df7c)) ### Features * Support dot notation on array fields ([#2120](#2120)) ([25ec684](25ec684))
🎉 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: #1343
Approach
Update ObjectStateMutation
estimateAttributes
andcommitServerChanges
.estimateAttributes
is called wheneverobj.attributes
is accessed.commitServerChanges
is called onobj.save
andobj.fetch
TODO
Tasks