Skip to content

Commit

Permalink
Fix belongsToMany jsdocs
Browse files Browse the repository at this point in the history
Current specification of belongsToMany has a bug. Its `otherKey` and `foreignKey` parameter description are mistakenly partially swapped.

Many issues have come up because of this problem. eg. #397, #1031, #1276
  • Loading branch information
vellotis committed Jun 14, 2016
1 parent 54c2237 commit 4f48a7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model.js
Expand Up @@ -264,13 +264,13 @@ const BookshelfModel = ModelBase.extend({
* @param {string=} foreignKey
*
* Foreign key in this model. By default, the `foreignKey` is assumed to
* be the singular form of the `Target` model's tableName, followed by `_id` /
* be the singular form of this model's tableName, followed by `_id` /
* `_{{{@link Model#idAttribute idAttribute}}}`.
*
* @param {string=} otherKey
*
* Foreign key in the `Target` model. By default, the `otherKey` is assumed to
* be the singular form of this model's tableName, followed by `_id` /
* be the singular form of the `Target` model's tableName, followed by `_id` /
* `_{{{@link Model#idAttribute idAttribute}}}`.
*
* @returns {Collection}
Expand Down

0 comments on commit 4f48a7f

Please sign in to comment.