cleverca22
7/19/2014 - 8:47 PM

gistfile1.js

var mongoose = require('mongoose');
mongoose.Types.ObjectId.prototype.toProtobuf = function () {
        return new Buffer(this.id,'binary');
}