node.js - Identity Map with Mongoose -


is there native way mongoose 4.x maintain identity map , avoid returning different object instances same entity in db?

users.findone({_id: objectid("xxx")}, function(err, user1) {   if (err) throw err;   users.findone({_id: objectid("xxx")}, function(err, user2) {      if (err) throw err;      console.log(user1 === user2); // return false   }); }); 


Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -