diff --git a/lib/associations.js b/lib/associations.js index fde4020..5c78938 100644 --- a/lib/associations.js +++ b/lib/associations.js @@ -130,7 +130,7 @@ Associations.prototype.getFetchPlan = function getFetchPlan(collectionName, crit var where = fetchPlan.slice(-1) === ' ' ? fetchPlan.slice(0, -1) : fetchPlan; return { where: where, - select: _.unique(select) + select: _.uniq(select) }; }; diff --git a/lib/collection/edge.js b/lib/collection/edge.js index 162efd0..1bc5c52 100644 --- a/lib/collection/edge.js +++ b/lib/collection/edge.js @@ -120,7 +120,7 @@ Edge.prototype.destroy = function destroy(criteria, cb) { if(results.length === 0){ return cb(null, results); } - var rids = _.pluck(results, 'id'); + var rids = _.map(results, 'id'); log.debug('Destroy rids: ' + rids); self.connection.db.delete(self.classCommand) diff --git a/lib/collection/vertex.js b/lib/collection/vertex.js index e7cc6ab..1103ca6 100644 --- a/lib/collection/vertex.js +++ b/lib/collection/vertex.js @@ -46,7 +46,7 @@ Vertex.prototype.destroy = function destroy(criteria, cb) { if(results.length === 0){ return cb(null, results); } - var rids = _.pluck(results, 'id'); + var rids = _.map(results, 'id'); log.debug('Destroy rids: ' + rids); self.connection.db.delete(self.classCommand) diff --git a/package.json b/package.json index 81a54e9..2ab63b4 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "async": "^1.0.0", "bluebird": "^3.4.1", "debug-logger": "^0.4.0", - "lodash": "^3.3.0", + "lodash": "^3.10.1", "orientjs": "^2.2.1", "waterline-criteria": "^1.0.1", "waterline-cursor": "~0.0.5", diff --git a/test/integration-orientdb/tests/adapterCustomMethods/increment.test.js b/test/integration-orientdb/tests/adapterCustomMethods/increment.test.js index 8723777..4cd354a 100644 --- a/test/integration-orientdb/tests/adapterCustomMethods/increment.test.js +++ b/test/integration-orientdb/tests/adapterCustomMethods/increment.test.js @@ -67,7 +67,7 @@ describe('Adapter Custom Methods', function () { function complete(err, results){ assert.equal(err, null); - var uniqueCounts = _.unique(results); + var uniqueCounts = _.uniq(results); assert.strictEqual(uniqueCounts.length, opsNumber); done(); });