Skip to content

Bug: replacing existing object leaves old properties #4246

Closed
@doender

Description

@doender

Issue Description

When saving an existing object with new properties, if the new object doesn't contain properties that the old object did, these properties are not removed.

Steps to reproduce

In Cloud Code, if we do:

var o = new Parse.Object('Class');
o.id = 'id';
o.set(key1, value1);
o.set(key2, value2);
o.save()

And then later:

var o = new Parse.Object('Class');
o.id = 'id';
o.set(key1, value1);
o.save()

o.get(key2) is still set as value2, instead of null.

Environment Setup

  • Server

    • parse-server version: 2.6.3
    • Localhost or remote server? Localhost
  • Database

    • MongoDB version: 3.0.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions