This commit is contained in:
Drew Gross
2016-06-13 00:57:23 -07:00
parent 634d672ad1
commit 452b737be4
7 changed files with 65 additions and 99 deletions

View File

@@ -648,7 +648,10 @@ DatabaseController.prototype.find = function(className, query, {
let classExists = true;
return this.loadSchema()
.then(schemaController => {
return schemaController.getOneSchema(className)
//Allow volatile classes if querying with Master (for _PushStatus)
//TODO: Move volatile classes concept into mongo adatper, postgres adapter shouldn't care
//that api.parse.com breaks when _PushStatus exists in mongo.
return schemaController.getOneSchema(className, isMaster)
.catch(error => {
// Behaviour for non-existent classes is kinda weird on Parse.com. Probably doesn't matter too much.
// For now, pretend the class exists but has no objects,