Merge pull request #66 from strongloop/model-builder

Switch to modelBuilder
This commit is contained in:
Raymond Feng 2013-11-15 13:32:08 -08:00
commit a7a098d5c3
1 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ loopback.errorHandler.title = 'Loopback';
*/
loopback.createDataSource = function (name, options) {
var ds = new DataSource(name, options, loopback.Model.dataSource);
var ds = new DataSource(name, options, loopback.Model.modelBuilder);
ds.createModel = function (name, properties, settings) {
var ModelCtor = loopback.createModel(name, properties, settings);
ModelCtor.attachTo(ds);
@ -170,7 +170,7 @@ loopback.memory = function (name) {
* @param {String} modelName The model name
*/
loopback.getModel = function(modelName) {
return loopback.Model.dataSource.models[modelName];
return loopback.Model.modelBuilder.models[modelName];
};
/*