transformWhere in MongoAdapter

This commit is contained in:
Drew Gross
2016-05-23 17:39:07 -07:00
parent 4052470820
commit 1ae1d42c32
2 changed files with 4 additions and 3 deletions

View File

@@ -199,8 +199,9 @@ export class MongoStorageAdapter {
// Executes a find. Accepts: className, query in Parse format, and { skip, limit, sort }.
find(className, query, { skip, limit, sort }, schema) {
let mongoWhere = this.transform.transformWhere(className, query, schema);
return this.adaptiveCollection(className)
.then(collection => collection.find(query, { skip, limit, sort }))
.then(collection => collection.find(mongoWhere, { skip, limit, sort }))
.then(objects => objects.map(object => transform.mongoObjectToParseObject(className, object, schema)));
}