You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
afterDelete hook (on about to be deleted object) not being called from afterDelete hook? #2939
I get code that deletes a child object on afterDelete
I also have a hook for afterDelete on the child for a child child but that don't seems to be called?
Parse.Cloud.afterDelete('Grandparent',(request)=>{varquery=newParse.Query('Parent');query.equalTo('grandparent',request.object.id);query.find().then((parents)=>{returnParse.Object.destroyAll(parents,{useMasterKey: true});}).then(()=>console.log('Removed all parents'));});Parse.Cloud.afterDelete('Parent',(request)=>{varquery=newParse.Query('Child');query.equalTo('parent',request.object.id);query.find().then((children)=>{returnParse.Object.destroyAll(children,{useMasterKey: true});}).then(()=>console.log('Removed all children'));});
changed the title [-]afterDelete hook (on about to be deleted object) not runned for from afterDelete?[/-][+]afterDelete hook (on about to be deleted object) not runned from afterDelete hook?[/+]on Oct 26, 2016
changed the title [-]afterDelete hook (on about to be deleted object) not runned from afterDelete hook?[/-][+]afterDelete hook (on about to be deleted object) not being called from afterDelete hook?[/+]on Oct 26, 2016
Activity
[-]afterDelete hook (on about to be deleted object) not runned for from afterDelete?[/-][+]afterDelete hook (on about to be deleted object) not runned from afterDelete hook?[/+][-]afterDelete hook (on about to be deleted object) not runned from afterDelete hook?[/-][+]afterDelete hook (on about to be deleted object) not being called from afterDelete hook?[/+]flovilmart commentedon Oct 26, 2016
Seems that you are using the wrong variable.
parentsvsconnectorsmaqen commentedon Oct 26, 2016
@flovilmart thanks for spotting the example typo
Looking through logs there are no actual calls for DELETE on
Childonly onParentflovilmart commentedon Oct 26, 2016
how are you monitoring the logs? on a local server? output of you process?
maqen commentedon Oct 26, 2016
Local server using
verbosein setting upParseServerflovilmart commentedon Oct 26, 2016
can you provide the full logs of this transaction?
maqen commentedon Oct 26, 2016
So my error was passing
request.object.idinstead ofrequest.objectas this is a pointer fieldSorry for the inconvenience and thanks @flovilmart for trying to help out
flovilmart commentedon Oct 26, 2016
Eheh No problem! This is mostly why we ask for the logs when reporting the issue :)