Fix the receiver
This commit is contained in:
parent
567efc5698
commit
24a1c76c59
|
@ -774,6 +774,7 @@ DataSource.prototype.discoverSchemasSync = function (owner, tableOrView, options
|
||||||
* @param cb
|
* @param cb
|
||||||
*/
|
*/
|
||||||
DataSource.prototype.discoverAndBuildModels = function (owner, tableOrView, options, cb) {
|
DataSource.prototype.discoverAndBuildModels = function (owner, tableOrView, options, cb) {
|
||||||
|
var self = this;
|
||||||
this.discoverSchemas(owner, tableOrView, options, function (err, schemas) {
|
this.discoverSchemas(owner, tableOrView, options, function (err, schemas) {
|
||||||
if (err) {
|
if (err) {
|
||||||
cb && cb(err, schemas);
|
cb && cb(err, schemas);
|
||||||
|
@ -785,9 +786,8 @@ DataSource.prototype.discoverAndBuildModels = function (owner, tableOrView, opti
|
||||||
var schema = schemas[s];
|
var schema = schemas[s];
|
||||||
schemaList.push(schema);
|
schemaList.push(schema);
|
||||||
}
|
}
|
||||||
;
|
|
||||||
|
|
||||||
var models = this.buildModels(schemaList);
|
var models = self.buildModels(schemaList);
|
||||||
cb && cb(err, models);
|
cb && cb(err, models);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue