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?
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?