Skip to content

Commit

Permalink
[closes #640] Rename inverseOf to inverse to be consistent with Ember…
Browse files Browse the repository at this point in the history
… Data
  • Loading branch information
samselikoff committed May 25, 2016
1 parent f7de432 commit d135499
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon/orm/associations/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HasMany extends Association {
}

getForeignKey() {
return `${this.opts.inverseOf || camelize(this.ownerModelName)}Id`;
return `${this.opts.inverse || camelize(this.ownerModelName)}Id`;
}

addMethodsToModelClass(ModelClass, key, schema) {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/orm/has-many/has-many-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class HasManyHelper {
hasManyArgs.push(otherModel);
}
if (ownModel !== otherKey) {
hasManyArgs.push({ inverseOf: otherKey });
hasManyArgs.push({ inverse: otherKey });
}

this.schema = new Schema(this.db, {
Expand Down

0 comments on commit d135499

Please sign in to comment.