-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature
Description
Is your feature request related to a problem? Please describe.
Sometimes an object should be saved with custom execution in its triggers (e.g. afterSave).
Describe the solution you'd like
It should be possible to pass arguments from the save
call to the triggers. There is already a context
object that is passed from beforeSave
to afterSave
. It would be practical to make the context
accessible in the save
call as an option, e.g.:
object.save(null, {context: {myArg: true}});
Parse.Cloud.beforeSave('MyClass', req => {
let myArg = req.context.myArg;
});
TODOs:
- Changes in JS SDK add context to Parse.Object.save Parse-SDK-JS#1150
- Changes in Parse Server add context to Parse.Object.save #6626
- Changes in docs Add context to object save in JS SDK docs#730
acinader, jonas-db, mman and yog27ray
Metadata
Metadata
Assignees
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature