Hi there, @gio.kakhiani… I’m not necessarily going to propose a best practice here, so you can stop reading now if you’d like.
If I understand your post correctly, there is really only one way for you to go when you consider how you structured your data types. You have no choice but to delete all of the replies on comments that are associated with the parent group’s post, then delete all of the comments, and then delete the post. That being said, you will have to use an advanced filter to get the list of replies because they are not directly linked to the post. So, it would be something like a search for replies where the reply’s related comment’s related post is the parent group’s post, and as you can imagine, that might not be the most efficient search/filter.
You mentioned that it seems kind of wrong to you to add a
related post field to the
Reply data type, but if it was me, I would likely have done exactly that for a number of reasons, including the delete situation you have described as well as the potential impact on privacy rules if you don’t add that field (i.e., the whole you can’t create rules with “this x’s y” limitation).
Anyway, I guess that’s just a bunch of food for thought there, and I hope it helps.