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
Post a Comment