Can someone tell me the database settings so I can like the comments made ? There will be a like button and people will be able to like comments. Many thanks to those who have helped so far.
Option 1: create many-to-many relationship between Comments and Users. Don’t forget to name it (smth like UsersLiked in Comments collection and CommentsLiked in Users collection), otherwise you’ll forget what was this relationship for.
Then, add the like toggle in your comments’ list, and set it up that it toggles the property for the Comment to Include Logged-in User.
Option 2: create a separate collection for comment likes (it’s called Junction/Associative Table). Link it to Users and to Comments with 1:many relationships, so that each entry in this table belongs uniquely to one user and one comment.
Then, create an entry in this table when user “likes” the comment (and hide the like button using visibility condition - button should be visible if count of records, where User=logged-in User and Comment=Current Comment should be 0).
But as for me, both methods may work quite slow on the threads with lots of comments.
Best regards, Victor.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.