So I tried using
newLocation.parent = try? parentLocationObject.toPointer()
But I get this error of it not being a valid pointer.
I’ve printed out the Location Object I have as well below.
**Optional(ParseSwift.Pointer<Lokality.Location>(__type: "Pointer", objectId: "XSGSQOxTon", className: "Location"))**
**Fatal error: Error saving: ParseError(code: ParseSwift.ParseError.Code.incorrectType, message: "This is not a valid Pointer")**
I’ve tried using a full Location object that I queried and pulled from the database, I’ve tried creating a new one (Location(objectId: “Xxxx”)).
Neither has worked. I’m not sure now what to look into on how to get this to recognize it as a Pointer
Seems like the actual object is good. I don’t know what else to do.
Edit: I don’t know if this helps but this is what my Logs show
Jun 18, 2021, 23:07:16 +08:00- ERROR
This is not a valid PointerError: This is not a valid Pointer
at getObjectType (/opt/app-root/src/node_modules/parse-server/lib/Controllers/SchemaController.js:1393:11)
at getType (/opt/app-root/src/node_modules/parse-server/lib/Controllers/SchemaController.js:1317:14)
at SchemaController.validateObject (/opt/app-root/src/node_modules/parse-server/lib/Controllers/SchemaController.js:1084:24)
at loadSchema.then.then (/opt/app-root/src/node_modules/parse-server/lib/Controllers/DatabaseController.js:443:21)
at process._tickCallback (internal/process/next_tick.js:68:7)