I just had a user delete two documents in my Raven DB. That caused issues as those documents were referenced by other documents. I know that Raven has a bundle to cascade delete, but I’m more looking for a way to disallow a delete if it’s referenced by another document. Is there a standard RavenDB way of doing this? Or do I need to loop through all of my documents to check if the document is referenced?
Share
Bob, unfortunately there’s no standard way to do this, because the database itself doesn’t know what a relation between documents is.
So, if you want to prevent user from deleting these documents then yes, you have to check yourself if there are any other documents referencing the current one.