Skip to content

Commit

Permalink
refactor(association): name model that association is missing from (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjensen authored and sushantdhiman committed Aug 9, 2019
1 parent ff97d93 commit dd428a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class Model {
static _transformStringAssociation(include, self) {
if (self && typeof include === 'string') {
if (!Object.prototype.hasOwnProperty.call(self.associations, include)) {
throw new Error(`Association with alias "${include}" does not exist`);
throw new Error(`Association with alias "${include}" does not exist on ${self.name}`);
}
return self.associations[include];
}
Expand Down

0 comments on commit dd428a0

Please # to comment.