MCPcopy
hub / github.com/loopbackio/loopback-next / load

Method load

packages/boot/src/booters/model.booter.ts:47–61  ·  view source on GitHub ↗

* Uses super method to get a list of Artifact classes. Boot each file by * creating a DataSourceConstructor and binding it to the application class.

()

Source from the content-addressed store, hash-verified

45 * creating a DataSourceConstructor and binding it to the application class.
46 */
47 async load() {
48 await super.load();
49
50 for (const cls of this.classes) {
51 if (!isModelClass(cls)) {
52 debug('Skipping class %s - no @model is found', cls.name);
53 continue;
54 }
55
56 debug('Bind class: %s', cls.name);
57 // We are binding the model class itself
58 const binding = this.app.model(cls);
59 debug('Binding created for model class %s: %j', cls.name, binding);
60 }
61 }
62}
63
64/**

Callers

nothing calls this directly

Calls 3

isModelClassFunction · 0.70
loadMethod · 0.65
modelMethod · 0.65

Tested by

no test coverage detected