Skip to content

Commit

Permalink
fix: Added some options to user log association
Browse files Browse the repository at this point in the history
  • Loading branch information
Nino van Galen committed May 8, 2020
1 parent ddd0d2e commit 0705aae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/database/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = (sequelize, Sequelize) => {
});

User.associate = (models) => {
User.hasMany(models.Log);
User.hasMany(models.Log, { foreignKey: 'userId', as: 'logs' });
};

return User;
Expand Down

0 comments on commit 0705aae

Please sign in to comment.