MCPcopy
hub / github.com/sequelize/sequelize / hasMany

Method hasMany

lib/model.js:4459–4459  ·  lib/model.js::Model.hasMany

* Creates a 1:m association between this (the source) and the provided target. * The foreign key is added on the target. * * @param {Model} target Target model * @param {object} [options] hasMany association options * @param {boolean} [options.ho

(target, options)

Source from the content-addressed store, hash-verified

4457 * User.hasMany(Profile) class="cm">// This will add userId to the profile table
4458 */
4459 static hasMany(target, options) {} class="cm">// eslint-disable-line
4460
4461 /**
4462 * Create an N:M association with a join table. Defining `through` is required.

Callers 15

UserGroup.tsFile · 0.80
docs-example.tsFile · 0.80
ModelInit.tsFile · 0.80
model.test.jsFile · 0.80
sequelize.test.jsFile · 0.80
instance.test.jsFile · 0.80
include.test.jsFile · 0.80
query.test.jsFile · 0.80
dao.test.jsFile · 0.80
dao.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected