Merge pull request #1888 from drew-gross/finish-moving-query-logic

Finish moving query logic
This commit is contained in:
Peter J. Shin
2016-05-24 16:38:14 -07:00
7 changed files with 85 additions and 96 deletions

View File

@@ -686,23 +686,6 @@ class SchemaController {
hasClass(className) {
return this.reloadData().then(() => !!(this.data[className]));
}
getRelationFields(className) {
if (this.data && this.data[className]) {
let classData = this.data[className];
return Object.keys(classData).filter((field) => {
return classData[field].type === 'Relation';
}).reduce((memo, field) => {
let type = classData[field];
memo[field] = {
__type: 'Relation',
className: type.targetClass
};
return memo;
}, {});
}
return {};
}
}
// Returns a promise for a new Schema.