Switch to modelBuilder
This commit is contained in:
parent
f2bfd1b6e4
commit
9fddbc3834
|
@ -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];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue