MCPcopy
hub / github.com/sequelize/sequelize / getModel

Method getModel

lib/model-manager.js:25–31  ·  lib/model-manager.js::ModelManager.getModel
(against, options)

Source from the content-addressed store, hash-verified

23 }
24
25 getModel(against, options) {
26 options = _.defaults(options || {}, {
27 attribute: class="st">'name'
28 });
29
30 return this.models.find(model => model[options.attribute] === against);
31 }
32
33 get all() {
34 return this.models;

Callers 6

modelMethod · 0.80
initMethod · 0.80
dropTableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected