https://github.com/LearnBoost/mongoose/blob/master/lib/document.js#L1136-L1154