advaya-mongo
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -76,6 +76,3 @@ var ObjectId= require('mongodb').ObjectId; | ||
{ | ||
allResults[index]=allResults[index].map(function (allResult) { | ||
allResult=toJSON(allResult); | ||
return allResult; | ||
}); | ||
allResults[index]=allResults[index].map(toJSON); | ||
} | ||
@@ -108,2 +105,6 @@ }); | ||
// if toJSON is defined in model, than apply that, also check the options variable | ||
if(options && options.hasOwnProperty('toJSON') && model.schema.hasOwnProperty('toJSON')) | ||
newObj= newObj.map(model.schema.toJSON); | ||
if(wasAnObject) | ||
@@ -110,0 +111,0 @@ return newObj[0]; |
@@ -36,3 +36,3 @@ var queryHelper= require('./utils/queryHelper'); | ||
{ | ||
additionalParams.push({"$sort" : queryHelper.dot_id(sort,model)}); | ||
additionalParams.push({"$sort" : queryHelper.project_dot_id(sort,model)}); | ||
} | ||
@@ -39,0 +39,0 @@ |
@@ -19,2 +19,3 @@ var queryHelper= require('./utils/queryHelper'); | ||
projectionObj= merge(queryHelper.project_dot_id(projection,modelName),projectionObj); | ||
@@ -21,0 +22,0 @@ return new Promise(function (resolve,reject) { |
{ | ||
"name": "advaya-mongo", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Advaya mongo plugin", | ||
@@ -29,3 +29,7 @@ "main": "index.js", | ||
"require-all": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"assert": "^1.4.1", | ||
"mocha": "^3.0.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
44565
43
1607
2