this.DoSomethingWithDb(this.someObject.findOne, conditions, this.RegisterDBCallback, additionalParams);
myboj.prototype.DoSomethingWithDb = function DoSomethingWithDb(dbMethod, conditions, callback, params) {
dbMethod(conditions, function(err, doc) {
if (err) {
return;
}
if (typeof callback === 'function') {
callback(doc, params);
}
});
};
....node_modules\mongoose\lib\model.js:949 this._applyNamedScope(query);
^ TypeError: Object # has no method '_applyNamedScope' at findOne (...\node_modules\mongoose\lib\mode l.js:949:8)
at DoSomethingWithDb (....server.js:2103:2)
DoSomethingWithDb