Skip to content

Keys being skipped when saving embedded Pointer #168

@cbaker6

Description

@cbaker6

When saving a ParseObject that contains a Pointer to the server, the ParseEncoder is skipping the className and objectId keys. For example:

struct Pagina : ParseObject {
    var objectId: String?
    var createdAt: Date?
    var updatedAt: Date?
    var ACL: ParseACL?
    var titolo: [String: String]?
    var parent: Pointer<Pagina>? //This will always have to be a pointer instead of an object. The same way it's represented on the server.
}

causing an error on the server:

error: This is not a valid Pointer {"code":111,"stack":"Error: This is not a valid Pointer\n    at getObjectType (/parse-server/lib/Controllers/SchemaController.js:1649:11)\n    at getType (/parse-server/lib/Controllers/SchemaController.js:1573:14)\n    at SchemaController.validateObject (/parse-server/lib/Controllers/SchemaController.js:1313:32)\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions