scottwrobinson / camo

A class-based ES6 ODM for Mongo-like databases.
557 stars 81 forks source link

What is difference between deleteOne and findOneAndDelete? #89

Open greenfrog82 opened 7 years ago

greenfrog82 commented 7 years ago

What is difference between deleteOne and findOneAndDelete? When I use these method, return count of deleted item and delete. That it. When I delete item, I wanna get deleted Item. So I use findOneAndDelete but this method doesn't return count of deleted item rather than deleted item. How can I get deleted item? and What is difference between deleteOne and findOneAndDelete?