Switch to modelBuilder

This commit is contained in:
Raymond Feng 2013-11-15 11:16:20 -08:00
parent f2bfd1b6e4
commit 9fddbc3834
1 changed files with 2 additions and 2 deletions

View File

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