Hi Harish, I would suggest you create two different unique IDs, one for the user and one for the post. create an entity that can store both IDs and a boolean IsLiked. while loading the page for the user, call a microflow to create an object in that entity with the current user id and the particular id and Isliked as false. when the user clicks the like change the boolean to true. for the like count create an calculated value that counts all boolean is liked with the post ID. one more suggestion is to use nanoflows as they work efficiently on browers.
Your association is wrong. You must have *-* association or you dont have an association at all.
1 post will be liked by many users and 1 user can like many posts.
If the association is wrong, then mostly the user will be using the same association that exists for another user.
There are multiple ways to achieve it. You can have a separate entity to keep track of whether a particular post is liked by a particular account or not. That way you can like or dislike a post by altering the LinkHelper object associated with that Account for that particular Post.
Something like this:
You can ofcourse construct it in a different manner based upon your domain model.