Refactor Model and PersistedModel registration
Modify the files to export a model factory function accepting a `registry` argument. This is a preparation step for per-application models - see #1212.
This commit is contained in:
parent
72d547971a
commit
c72c134d80
1538
lib/model.js
1538
lib/model.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -431,8 +431,8 @@ registry.DataSource = DataSource;
|
|||
* @private
|
||||
*/
|
||||
|
||||
registry.Model = require('./model');
|
||||
registry.PersistedModel = require('./persisted-model');
|
||||
registry.Model = require('./model')(registry);
|
||||
registry.PersistedModel = require('./persisted-model')(registry);
|
||||
|
||||
// temporary alias to simplify migration of code based on <=2.0.0-beta3
|
||||
Object.defineProperty(registry, 'DataModel', {
|
||||
|
|
Loading…
Reference in New Issue