Use schema collection instead of adaptive collection for all schema operations.

This commit is contained in:
Nikita Lutsenko
2016-03-09 15:21:29 -08:00
parent 2730398b92
commit d86f0a8c69
4 changed files with 19 additions and 32 deletions

View File

@@ -63,7 +63,7 @@ DatabaseController.prototype.validateClassName = function(className) {
DatabaseController.prototype.loadSchema = function(acceptor = returnsTrue) {
if (!this.schemaPromise) {
this.schemaPromise = this.adaptiveCollection('_SCHEMA').then(collection => {
this.schemaPromise = this.schemaCollection().then(collection => {
delete this.schemaPromise;
return Schema.load(collection);
});
@@ -74,7 +74,7 @@ DatabaseController.prototype.loadSchema = function(acceptor = returnsTrue) {
if (acceptor(schema)) {
return schema;
}
this.schemaPromise = this.adaptiveCollection('_SCHEMA').then(collection => {
this.schemaPromise = this.schemaCollection().then(collection => {
delete this.schemaPromise;
return Schema.load(collection);
});