Is self generated object_id in mongo's collection unique across all the collections? Assuming my book_category collection, I have to put user_id to get all of the user's saved book category.
But how about update the data of book_category? should I put user_id inside my book category collection too?
module.exports.updateCategory = function(category_id,category,callback){
var update = {
name: category.category_name
}
Product_category.findOneAndUpdate({"_id":category_id},update,callback);
}
If the id is unquie accross the entire of my app then above code work fine. What will you do in my case?