I am just curious if this is bad practice. On my user object, under the profile attribute I am plaing on storing the users likes. For instance the object would be like this:
user {
profile: {
likes: [
{
user: { _id: USER_ID,
avatar: USER_AVATAR,
useame: USER_USERNAME
},
...
]
}
}
What conces me about doing it this way is that if the user associated changes his avatar, it wouldn't be the same as the avatar associated to this user. Also likes could have an infinite amount so I am afraid that could get really hit my performance as the array grows.
Is there a better way to approach this? I know in a traditional database, i would have a separate table for this and use a join to pull the users likes.
Cheers!
