-
-
Save gharriso/1811e2f575c20cf022033fdbe6033788 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.orders.find({customerId:customerId},{_id:1}).forEach((order)=>{ | |
var rc1=db.lineitems.deleteMany({orderId:order._id}); | |
}); | |
var rc2=db.orders.deleteMany({customerId:customerId}); | |
var rc3=db.customers.deleteOne({_id:customerId}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment