I’m trying to implement a “follow” system, and my first inclination was to create a Following list field of type User on the User object. That would make it simple to list the people being followed BY the current user.
However, I’d also like to list the people following the current user, which suggests the query would be something like “Search Users where Following contains Current User”. From a performance standpoint, would I be better off creating a many-to-many relationship using a Data Type (table) called Follows, which would link the follower to the user being followed?
The first approach seems a bit more intuitive, but which would yield the best performance?
Thanks for the info, @NigelG. So that suggests that whenever someone follows or unfollows someone, two users are updated - the follower and the followee, right?
Out of curiosity and for future reference, does that approach offer a performance advantage over creating a separate many-to-many “thing” which would presumably involve updating just a single record per follow/unfollow action?