Skip to content

_op: delete returning on after save object result #8386

Open
@matheusfrozzi

Description

@matheusfrozzi

New Issue Checklist

Issue Description

When we save an object on parse and delete a property, it is returning in the API { __op: 'Delete' }
We manipulate the object on AfterSave and print it before returning, and it doesn't appear these values.
It looks like it is added after the afterSave.

Steps to reproduce

Delete a value on a property field:

    if (!helper.isNullOrUndefined(skippedAt) && dirtyKeys.includes("skippedAt")) {
        eventOccurrence.set("skippedAt", new Date(skippedAt));
    } else {
        eventOccurrence.set('skippedAt', { __op: 'Delete' });
    }

Actual Outcome

"skippedAt":{"__op":"Delete"},
"rescheduledTo":{"__op":"Delete"},
"deletedAt":{"__op":"Delete"}

Expected Outcome

Don't return these information, because it broke the Model serialization in the apps front end

Environment

Parse server Version 5.4.0 with MongoDB 5

Server

  • Parse Server version: 5.40
  • Operating system: Linux Ubuntu
  • Local or remote host: Google Cloud

Database

  • System (MongoDB or Postgres): Mongo
  • Database version: 5.0.14
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): MongoDB Atlas

Logs

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