Skip to content

Commit

Permalink
fix(criteria): Removed old reference to where instead of criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
pilsy committed Mar 11, 2015
1 parent dd5dd67 commit 09aafda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/utils/model/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function destroyModels(queryOptions) {
return new Promise(function destroy(resolve, reject) {
async.waterfall([
this.callback(helpers.isExtendedModel),
this.callback(helpers.where.exists, 'destroy', queryOptions.where, queryOptions),
this.callback(helpers.criteria.exists, 'destroy', queryOptions.where, queryOptions),
this.callback(helpers.events.beforeEvent, 'beforeDestroy', queryOptions.where, queryOptions),
this.callback(helpers.alias.associations.forQuery, queryOptions.where, true),
this.callback(helpers.alias.fields.forQuery, queryOptions.where),
Expand All @@ -35,4 +35,4 @@ module.exports = function destroyModels(queryOptions) {
this.callback(helpers.handleResult.removeReferencedModel, resolve, reject));
}
.bind(this));
};
};
4 changes: 2 additions & 2 deletions lib/utils/model/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = function updateModels(values, queryOptions) {
return new Promise(function update(resolve, reject) {
async.waterfall([
this.callback(helpers.isExtendedModel),
this.callback(helpers.where.exists, 'update', values, queryOptions),
this.callback(helpers.criteria.exists, 'update', values, queryOptions),
this.callback(helpers.alias.associations.forOutput,values),
this.callback(helpers.alias.fields.forOutput, queryOptions.where),
this.callback(helpers.events.beforeEvent, 'beforeUpdate', values, queryOptions),
Expand All @@ -42,4 +42,4 @@ module.exports = function updateModels(values, queryOptions) {
this.callback(helpers.handleResult.returnModels, resolve, reject));
}
.bind(this));
};
};

0 comments on commit 09aafda

Please sign in to comment.