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

Bug fix: issue when encoding objects that are already saved #48

Merged
merged 5 commits into from
Jan 10, 2021
Merged

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Jan 8, 2021

Fixes #47. Previous commits didn't enforce ParseObjects going through the ParseEncoder. Since they go through now, there was a bug in the encoder when objects were already saved. They were automatically converted to Pointers, even if they were themselves. This caused issues when attempting to saveAll as 1) there were keys the server didn't like 2) No other key/value info wasn't being sent during the update

@cbaker6
Copy link
Contributor Author

cbaker6 commented Jan 8, 2021

@pmmlo thanks for filing this issue. It was definitely a corner case that wasn't easy to find.

Can you test this out in your scenarios and left me know if you see any other issues. You should try to run other scenarios that you know use to work as well.

@codecov
Copy link

codecov bot commented Jan 8, 2021

Codecov Report

Merging #48 (116a80b) into main (9575409) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   76.63%   76.65%   +0.02%     
==========================================
  Files          42       42              
  Lines        3757     3757              
==========================================
+ Hits         2879     2880       +1     
+ Misses        878      877       -1     
Impacted Files Coverage Δ
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 74.73% <ø> (ø)
Sources/ParseSwift/Objects/ParseObject.swift 76.84% <0.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9575409...116a80b. Read the comment docs.

@cbaker6 cbaker6 merged commit ca096b5 into main Jan 10, 2021
@cbaker6 cbaker6 deleted the batchFix branch January 10, 2021 22:23
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.

New issue with .saveAll batch operation
1 participant