Attach models to the data source

This commit is contained in:
Raymond Feng 2013-12-04 15:24:53 -08:00
parent 2bc8d21969
commit 8360576c40
1 changed files with 4 additions and 0 deletions

View File

@ -1241,6 +1241,10 @@ DataSource.prototype.discoverAndBuildModels = function (modelName, options, cb)
}
var models = self.modelBuilder.buildModels(schemaList);
// Now attach the models to the data source
for(var m in models) {
models[m].attachTo(self);
}
cb && cb(err, models);
});
};