Fix the receiver

This commit is contained in:
Raymond Feng 2013-06-03 08:51:17 -07:00
parent 567efc5698
commit 24a1c76c59
1 changed files with 2 additions and 2 deletions

View File

@ -774,6 +774,7 @@ DataSource.prototype.discoverSchemasSync = function (owner, tableOrView, options
* @param cb
*/
DataSource.prototype.discoverAndBuildModels = function (owner, tableOrView, options, cb) {
var self = this;
this.discoverSchemas(owner, tableOrView, options, function (err, schemas) {
if (err) {
cb && cb(err, schemas);
@ -785,9 +786,8 @@ DataSource.prototype.discoverAndBuildModels = function (owner, tableOrView, opti
var schema = schemas[s];
schemaList.push(schema);
}
;
var models = this.buildModels(schemaList);
var models = self.buildModels(schemaList);
cb && cb(err, models);
});
}