{"action":"created","issue":{"url":"https://api.github.com/repos/dsanel/mongoose-delete/issues/4","repository_url":"https://api.github.com/repos/dsanel/mongoose-delete","labels_url":"https://api.github.com/repos/dsanel/mongoose-delete/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/dsanel/mongoose-delete/issues/4/comments","events_url":"https://api.github.com/repos/dsanel/mongoose-delete/issues/4/events","html_url":"https://github.com/dsanel/mongoose-delete/issues/4","id":135357721,"number":4,"title":"Bulk soft-delete / restore","user":{"login":"enkodellc","id":2935721,"avatar_url":"https://avatars.githubusercontent.com/u/2935721?v=3","gravatar_id":"","url":"https://api.github.com/users/enkodellc","html_url":"https://github.com/enkodellc","followers_url":"https://api.github.com/users/enkodellc/followers","following_url":"https://api.github.com/users/enkodellc/following{/other_user}","gists_url":"https://api.github.com/users/enkodellc/gists{/gist_id}","starred_url":"https://api.github.com/users/enkodellc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enkodellc/subscriptions","organizations_url":"https://api.github.com/users/enkodellc/orgs","repos_url":"https://api.github.com/users/enkodellc/repos","events_url":"https://api.github.com/users/enkodellc/events{/privacy}","received_events_url":"https://api.github.com/users/enkodellc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-22T09:06:59Z","updated_at":"2016-03-11T21:49:42Z","closed_at":"2016-03-11T21:49:42Z","body":"I want to do soft-delete and then possibly restore a group of related items, requiring a find query. My soft-deletes do have the deletedBy option. Basically I would like to do a find and soft-delete / find and restore in one call instead of doing a find and then going walking though each object to soft-delete / restore So I thought I could chain it like so but it fails:\r\n\r\n`\r\nModal.find({'name': name._id}).delete(req.user._id, function(err) {});\r\n`\r\n\r\nIt works if walk though them but it seems like this would be much slower:\r\n`\r\n       Modal.find({'name': name._id})\r\n          .select('_id')\r\n          .exec(function(err, modals) {\r\n            for(var i = 0; i < modals.length; i++) {\r\n              modal[i].delete(req.user._id, function(err) {});\r\n            }\r\n        });\r\n`"},"comment":{"url":"https://api.github.com/repos/dsanel/mongoose-delete/issues/comments/195567482","html_url":"https://github.com/dsanel/mongoose-delete/issues/4#issuecomment-195567482","issue_url":"https://api.github.com/repos/dsanel/mongoose-delete/issues/4","id":195567482,"user":{"login":"dsanel","id":287400,"avatar_url":"https://avatars.githubusercontent.com/u/287400?v=3","gravatar_id":"","url":"https://api.github.com/users/dsanel","html_url":"https://github.com/dsanel","followers_url":"https://api.github.com/users/dsanel/followers","following_url":"https://api.github.com/users/dsanel/following{/other_user}","gists_url":"https://api.github.com/users/dsanel/gists{/gist_id}","starred_url":"https://api.github.com/users/dsanel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsanel/subscriptions","organizations_url":"https://api.github.com/users/dsanel/orgs","repos_url":"https://api.github.com/users/dsanel/repos","events_url":"https://api.github.com/users/dsanel/events{/privacy}","received_events_url":"https://api.github.com/users/dsanel/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T21:49:41Z","updated_at":"2016-03-11T21:49:41Z","body":"Hi @enkodellc, thx for proposal!\r\n\r\nIn new version we have bulk delete and restore methods: https://www.npmjs.com/package/mongoose-delete#bulk-delete-and-restore"}}