sequelização mmm
User.belongsToMany(Bar, { through: UserPubCrawl });
Bar.belongsToMany(User, { through: UserPubCrawl });
User.findAll({
where: { user_id: '123' },
include: {
model: Bars,
through: { attributes: [] } // this will remove the rows from the join table (i.e. 'UserPubCrawl table') in the result set
}
});
Fierce Ferret