不要怂,就是干,撸起袖子干!

Commit aa2d390b by Mick Hansen

Merge pull request #4582 from subjectix/master

Corrected API doc for BelongsTo association, Fixes #4580
2 parents e6c42a4a 42056d7d
Showing with 3 additions and 3 deletions
...@@ -10,7 +10,7 @@ var Utils = require('./../utils') ...@@ -10,7 +10,7 @@ var Utils = require('./../utils')
/** /**
* One-to-one association * One-to-one association
* *
* In the API reference below, replace `Assocation(s)` with the actual name of your association, e.g. for `User.belongsToMany(Project)` the getter will be `user.getProjects()`. * In the API reference below, replace `Assocation` with the actual name of your association, e.g. for `User.belongsTo(Project)` the getter will be `user.getProject()`.
* *
* @mixin BelongsTo * @mixin BelongsTo
*/ */
...@@ -75,7 +75,7 @@ var BelongsTo = function(source, target, options) { ...@@ -75,7 +75,7 @@ var BelongsTo = function(source, target, options) {
* Get the associated instance * Get the associated instance
* *
* @param {Object} [options] * @param {Object} [options]
* @param {String|Boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false * @param {String|Boolean} [options.scope] Apply a scope on the related model, or remove its default scope by passing false.
* @return {Promise<Instance>} * @return {Promise<Instance>}
* @method getAssociation * @method getAssociation
*/ */
...@@ -83,7 +83,7 @@ var BelongsTo = function(source, target, options) { ...@@ -83,7 +83,7 @@ var BelongsTo = function(source, target, options) {
/** /**
* Set the associated model * Set the associated model
* *
* @param {Instance|String|Number} [newAssociations] An array of instances or primary key of instances to associate with this. Pass `null` or `undefined` to remove all associations. * @param {Instance|String|Number} [newAssociation] An instance or the primary key of an instance to associate with this. Pass `null` or `undefined` to remove the association.
* @param {Object} [options] Options passed to `this.save` * @param {Object} [options] Options passed to `this.save`
* @param {Boolean} [options.save=true] Skip saving this after setting the foreign key if false. * @param {Boolean} [options.save=true] Skip saving this after setting the foreign key if false.
* @return {Promise} * @return {Promise}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!