MCPcopy
hub / github.com/sequelize/sequelize / hasOne

Method hasOne

src/model.js:4676–4676  ·  view source on GitHub ↗

* Creates an 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] hasOne association options * @param {boolean} [options.hooks=false] Set to tru

(target, options)

Source from the content-addressed store, hash-verified

4674 * User.hasOne(Profile) // This will add userId to the profile table
4675 */
4676 static hasOne(target, options) {} // eslint-disable-line
4677
4678 /**
4679 * Creates an association between this (the source) and the provided target. The foreign key is added on the source.

Callers 15

instance.test.jsFile · 0.80
include.test.jsFile · 0.80
createUsersAndItemsFunction · 0.80
scope.test.jsFile · 0.80
has-one.test.jsFile · 0.80
belongs-to.test.jsFile · 0.80
findOne.test.jsFile · 0.80
findAll.test.jsFile · 0.80
include.test.jsFile · 0.80

Calls

no outgoing calls

Tested by 1

createUsersAndItemsFunction · 0.64