Globally published models for railway 1.0
This commit is contained in:
parent
e0f5f18774
commit
83695513f9
|
@ -172,6 +172,9 @@ function prepareContext(models, railway, app, defSchema, done) {
|
|||
callback && callback();
|
||||
m = (schema || defSchema).define(className, _models[cname], settings[cname]);
|
||||
}
|
||||
if (global.railway) {
|
||||
global[cname] = m;
|
||||
}
|
||||
return models[cname] = ctx[cname] = m;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue