Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix context when updating / cascade-saving objects #6736

Closed
3 tasks done
mtrezza opened this issue Jun 16, 2020 · 1 comment · Fixed by #6735
Closed
3 tasks done

Fix context when updating / cascade-saving objects #6736

mtrezza opened this issue Jun 16, 2020 · 1 comment · Fixed by #6735

Comments

@mtrezza
Copy link
Member

mtrezza commented Jun 16, 2020

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:

@mtrezza
Copy link
Member Author

mtrezza commented Jun 30, 2020

@dplewis When can we merge these PRs? I feel the more time passes, the harder it gets to track and eventually merge all these changes. Especially since we are already getting PRs (#6764) that run in parallel to the PRs here. Can I support you somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant