Accessing belongsToMany associates inside of instance
问题 I am in the process of converting an existing rails app to nodejs using sequelize to interface to the existing database (created using ActiveRecord). This is a shopping application, so I have a Product class and a Cart class that I want to associate together. In my existing application I use a third class, CartLineItem to associate them together. Inside of the Product class I use the following: classMethods: { associate: function(models) { Cart.belongsToMany(models.Product, { through: models