I’ve been trying to apply unique index in combination in mongoDb databse using in my node.js backend, but unable to get away with the duplicate error
The movie is supposed to be added to the single document named as watchlist of all user, but i tried to apply unique index in combination of profile_id(user) and content_id(movie_id) so that same movie can be added to the database for different users and different movies can be added for same user. But when im trying to add the same movie after logging in with different email, the duplicate error(error.code === 11000) is still being displayed.