From a03537c059e3da0ce547d0e0913b1d10018c24df Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 28 May 2017 13:19:11 +0200 Subject: participant has one p_s --- model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'model.js') diff --git a/model.js b/model.js index dca6e43..0611200 100644 --- a/model.js +++ b/model.js @@ -48,7 +48,7 @@ module.exports = (seq, Seq) => { Participant.belongsTo(Roster, { foreignKey: "roster_api_id", targetKey: "api_id" }); Participant.belongsTo(Match, { foreignKey: "match_api_id", targetKey: "api_id" }); Participant.belongsTo(Player, { foreignKey: "player_api_id", targetKey: "api_id" }); - Participant.hasMany(ParticipantStats, { as: "participant_stats", foreignKey: "participant_api_id", sourceKey: "api_id" }); + Participant.hasOne(ParticipantStats, { as: "participant_stats", foreignKey: "participant_api_id", sourceKey: "api_id" }); /* Participant.belongsTo(GameMode, { foreignKey: "game_mode_id" }); Participant.belongsTo(Hero, { foreignKey: "hero_id" }); -- cgit v1.3.1