Is there a way when making a SequelizeJS query on an object, and including a relation which has a belongs-to-many association, to have the included property not return the assoc
Found a solution to this in a github comment: https://github.com/sequelize/sequelize/issues/4074#issuecomment-153054311
gist:
Users.findAll({ include: [ { model: Role, as: 'roles', through: {attributes: []} //<-- this line will prevent mapping object from being added } ] });