Sequelize how to use association table?
问题 I'm having an issue with Sequelize because I don't know how to approach the problem. I have 3 tables : A (game), B(platform) and AB (game_platform). A can have 1 to many B and B can have 0 to many A. To do that I made an association table : AB. In Sequelize I created the A,B,AB models then I did : db.Game.belongsToMany(db.Platform, {as: 'Game', through: 'GamePlatformsJoin', foreignKey: 'game_platforms_fk_game'}); db.Platform.belongsToMany(db.Game, {as: 'Platform', through: 'GamePlatformsJoin'