hi friends,
how to prevent the club liked by one user from being updated by another user when he like same club.I have attached my module for your reference
screenshot with second user logged in
Hi Karthik,
Do you want to relate the "like" to the user, am I right, i.e. if a user likes a club other user is not forced to also like it?
If yes, you must associate the user id to the club in the database. A possible solution is to create an entity where each record has an attribute with the User Id and the Id of the Club he liked.
Does it solve your problem?
Regards,
António Pereira
António Pereira wrote:
hi antonio,
In My Case when one user likes a club it should be saved seperately instead of updating the previous users liked
In second screenshot you can see that userid 2 is replaced with userid 9.I want user id 9 to be inserted instead of updating the previous user id 2.
karthik R wrote:
With my solution, you'll not update other users like status to a club after another user likes a club since each like is represented by the Club Id and User Id. When you need to get the clubs that a specific user liked, you just add a filter to the query to get only the rows that contain the specific User Id you want.
Well,
Looking at the query you are missing a vital part.
the solution lies in your question..
you want to see the users clubs and if he/she likes it or not, yet you have no reference at all in the query on the user.