You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to store comments under the QUESTION or ANSWER object as or as objects. Storing as array allows taking advantage of just pushing into Mongo, very easy. Store comments_count as separate field in collection. Also generate resource_id for comment and store then in each comment object as well as in separate collection that will map comment_id to question_id or answer_id as well as store the type of comment QUESTION or ANSWER, so that we know if which collection to look for it. Knowing just the commendID we can get collectionName and id or question or answer, the get all comments and then finally get that one comment.
Should also limit number of comments per resourse to about 50. This way it will not grow to such a size that it will impose memory problem because we will have to select all comments in many cases when we need to find specific one like for editing or for deletion
The text was updated successfully, but these errors were encountered:
Need to store comments under the QUESTION or ANSWER object as or as objects. Storing as array allows taking advantage of just pushing into Mongo, very easy. Store comments_count as separate field in collection. Also generate resource_id for comment and store then in each comment object as well as in separate collection that will map comment_id to question_id or answer_id as well as store the type of comment QUESTION or ANSWER, so that we know if which collection to look for it. Knowing just the commendID we can get collectionName and id or question or answer, the get all comments and then finally get that one comment.
Should also limit number of comments per resourse to about 50. This way it will not grow to such a size that it will impose memory problem because we will have to select all comments in many cases when we need to find specific one like for editing or for deletion
The text was updated successfully, but these errors were encountered: