Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse Swift SDK.
Issue Description
Setting a value on an optional model property doesn't propagate to the server.
Steps to reproduce
struct TestObject: ParseObject {
// ParseObject Conformance
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
var testValue: String?
}
var testObj = TestObject()
testObj.testValue = "value"
testObj = try! testObj.save()
// Break here and check value on dashboard
testObj.testValue = nil
testObj = try! testObj.save()
// Break here and check value again on dashboard, see that it still says "value" and not (undefined)
Expected Outcome
Final value on dashboard should be (undefined) or nil, instead of keeping the old value.
Environment
Client
- Parse Swift SDK version:
2.0.2
- Xcode version:
13.0
- Operating system (iOS, macOS, watchOS, etc.):
macOS
- Operating system version:
11.6
Server
- Parse Server version:
4.10.4
- Operating system:
Ubuntu
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Digital Ocean
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
4.4
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Digital Ocean