Skip to content
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

fix: encode pointer object properties properly when batching #390

Merged
merged 4 commits into from
Aug 17, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Aug 16, 2022

New Pull Request Checklist

Issue Description

Batch saving objects that has other parse objects as properties are not encoded correctly, causing the server to throw errors.

Related issue: #387

Approach

Ensure properties that are already savedParseObject's are converted to Parse pointers during encoding.

TODOs before merging

  • Add tests

@parse-github-assistant
Copy link

parse-github-assistant bot commented Aug 16, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@cbaker6 cbaker6 linked an issue Aug 16, 2022 that may be closed by this pull request
4 tasks
@codecov
Copy link

codecov bot commented Aug 17, 2022

Codecov Report

Merging #390 (ae48ead) into main (50f655b) will increase coverage by 0.03%.
The diff coverage is 97.22%.

@@            Coverage Diff             @@
##             main     #390      +/-   ##
==========================================
+ Coverage   89.15%   89.19%   +0.03%     
==========================================
  Files         156      156              
  Lines       14528    14553      +25     
==========================================
+ Hits        12953    12981      +28     
+ Misses       1575     1572       -3     
Impacted Files Coverage Δ
Sources/ParseSwift/API/BatchUtils.swift 100.00% <ø> (ø)
Sources/ParseSwift/Objects/ParseObject.swift 87.29% <96.96%> (+2.03%) ⬆️
Sources/ParseSwift/Objects/ParseUser.swift 85.80% <96.96%> (-0.50%) ⬇️
Sources/ParseSwift/Objects/ParseInstallation.swift 84.90% <97.22%> (-0.56%) ⬇️
Sources/ParseSwift/API/API+Command.swift 89.21% <100.00%> (ø)
...urces/ParseSwift/API/API+NonParseBodyCommand.swift 81.59% <100.00%> (+0.49%) ⬆️
Sources/ParseSwift/Coding/ParseEncoder.swift 78.03% <100.00%> (-0.21%) ⬇️
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 76.75% <0.00%> (+0.58%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cbaker6 cbaker6 merged commit 675168e into parse-community:main Aug 17, 2022
@cbaker6 cbaker6 deleted the batchingUpdates branch August 17, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

saveAll doesn't handle pointers
1 participant