Closed benloh closed 2 months ago
@jdanish Is it safe to assume that if a user requests to delete a node or an edge, it's OK to delete it even if there are comments (read or unread) still attached to the node/edge? In other words, the presence of unread comments should not prevent you from being able to delete a node? Or do you want to prevent someone from deleting a node or edge if there are unread comments?
At first I thought we could get away with ignoring the main issue (that a deleted node does not delete the comment), but after testing it out, we could very well end up with mysterious holdover comments.
I think delete it and the comments go with it. Thanks!
Implemented with 9e1735903e1486afeb14e1b8cfd2d9aa94c723d9
Currently when you delete a node/edge that has comments, we are not actually deleting the comments. This means, if you delete a node, but then add a node that uses the same collection reference id (e.g.
n4
for Node 4, which maybe was previously deleted, but upon restarting the app, you might end up with a Node 4 again because it was previously deleted), any comments that had previously existed will also be restored.This shouldn't come up too much since you'd have to somehow re-use the node id. Generally this would only happen if you delete a bunch of nodes that have comments, shut down the server, and restart it. The current id count is reset.