I have a very simple test model:
struct Library: ParseObject {
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
var name: String = ""
}
struct Recipe: ParseObject {
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
var title: String = ""
var library: Library?
init(title: String) {
self.title = title
}
init(objectId: String?) {
self.objectId = objectId
}
}
Now if I comment out Recipe.library, ParseSwift will decode the server response alright. But with it, it won’t work. I can’t see the difference between the GameScore/Level objects in the tests and my Recipe/Library objects. Help?
Here’s the server response:
{
"results": [
{
"objectId": "xG4l32l9jY",
"title": "Gâteau au fromage",
"library": {
"__type": "Pointer",
"className": "Library",
"objectId": "m8WNpqBgeD"
},
"createdAt": "2021-03-19T18:29:15.917Z",
"updatedAt": "2021-03-19T18:29:15.917Z"
}
]
}
Worth mentioning: saving a Recipe works fine.