Skip to content

Fix context when updating / cascade-saving objects #6736

Closed
@mtrezza

Description

@mtrezza

Issue Description

The introduction of making the trigger context accessible when saving an object (#6459) did not account for 2 use cases:

  1. No context is set when saving an existing object as discovered by @marcinjakubowski Make trigger context accessible in save #6459 (comment):
const obj = new Parse.Object("TestObject");
await obj.save(null);
await obj.save(null, { context: { a: 'a' } });
  1. The context is not set when cascade-saving objects so that context is inherited by child objects (obj2 in this example) as discovered by @davbeck Make trigger context accessible in save #6459 (comment):
const obj = new Parse.Object("TestObject");
const obj2 = new Parse.Object("TestObject2");
obj.set("obj2", obj2);
await obj.save(null, { context: { a: 'a' } });

TODOs:

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