Pass parse format schema to transformWhere

This commit is contained in:
Drew Gross
2016-04-25 22:45:16 -07:00
parent 608cba9e8c
commit 4371ca164c
3 changed files with 77 additions and 38 deletions

View File

@@ -174,14 +174,15 @@ export class MongoStorageAdapter {
// If there is some other error, reject with INTERNAL_SERVER_ERROR.
// Currently accepts the schemaController, and validate for lecacy reasons
deleteObjectsByQuery(className, query, schemaController, validate) {
deleteObjectsByQuery(className, query, schemaController, validate, parseFormatSchema) {
return this.adaptiveCollection(className)
.then(collection => {
let mongoWhere = transform.transformWhere(
schemaController,
className,
query,
{ validate }
{ validate },
parseFormatSchema
);
return collection.deleteMany(mongoWhere)
})