Permalink
Browse files

fix: resolve ObjectIDs in batch delete query

  • Loading branch information...
eduardoboucas committed Dec 13, 2016
1 parent 239ce13 commit 3d407f9f06355699baf4f48ae14d1aca8e9d229b
Showing with 2 additions and 0 deletions.
  1. +2 −0 dadi/lib/model/index.js
@@ -943,6 +943,8 @@ Model.prototype.delete = function (query, done, req) {

this.castToBSON(query)

query = queryUtils.convertApparentObjectIds(query, this.schema)

var startDelete = (database) => {
// apply any existing `beforeDelete` hooks, otherwise delete the documents straight away
if (this.settings.hooks && this.settings.hooks.beforeDelete) {

0 comments on commit 3d407f9

Please sign in to comment.