I have a model that looks like:
class Comment {
public string ID { get; set; }
public string ArticleType { get; set; }
public string ArticleID { get; set; }
public string Body { get; set; }
public DateTime DateCreated { get; set; }
public string UserID { get; set; }
}
I am creating an app to store comments about other stuff in our application For example, if the comment was regarding a product, the ArticleType could be “product” and the ArticleID would be the product id...
I am going to use mongodb to store this data
I want to be able to reply to a comment, and store the response hierarchically Should I store a List within the comment doc?
I read this article by Rob Ashton Which makes sense for things like a blog post, and it’s comments...
However, in my model, the “reply comments” refer directly to the parent comment.
Comment replies could also even have replies, making them x levels deep...? Would this be out of the scope of map reduce type query?
Edit:
"article" is probably bad terminology - ArticleType and ArticleId was just a way of tying a comment to a particular "thing" - for example, if we were commenting on this question, articleType could be stackOverflowQuestion and id would be 5144273
If we were commenting on an ebay auction, we could have articleType as ebay and articleId as 1234902493984 (item number)
Hopefully that makes more sense...