From 9fddbc38349fa76e5aed7d6aaf23cc08cfb2948a Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 15 Nov 2013 11:16:20 -0800 Subject: [PATCH] Switch to modelBuilder --- lib/loopback.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/loopback.js b/lib/loopback.js index 468df874..3de9b04c 100644 --- a/lib/loopback.js +++ b/lib/loopback.js @@ -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]; }; /*