Merge pull request #66 from strongloop/model-builder
Switch to modelBuilder
This commit is contained in:
commit
a7a098d5c3
|
@ -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];
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue