Is there any way I can make an association unique? I currently have a setup where a User can like a PlaylistItem via a hasMany association, but I can't prevent that user from being added multiple times. Am I missing something?
playlist_item.addLikers( user, function( err ){
playlist_item.addLikers( user, function( err ){
// I can just keep adding the same user
});
});
Is there any way I can make an association unique? I currently have a setup where a
User
can like aPlaylistItem
via a hasMany association, but I can't prevent that user from being added multiple times. Am I missing something?