Stuff like for example user created a question in a community. When he presses delete, should we .remove() the document or just update the isDelete status?
What are the benefits of either approach?
Joseph S Stevens
10 years of Software Development, Husband, Father and Functional Programming enthusiast.
Sandeep Panda
co-founder, Hashnode
Hi Abhishek!
I will go with soft delete approach. With this, you can keep a log of questions that have been asked so far -- including the ones that have been deleted. Questions get deleted for varieties of reasons such as spam reports, the OP decides to delete and so on. But you should be able to answer questions such as how many questions came into the system, how many got deleted and for what reason etc. So, it's best to soft delete them even though it results in higher data size.