Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to do joins in sequelize and select things from the third table

User.findAll({
  include: [{
    model: Project,
    through: {
      attributes: ['createdAt', 'startedAt', 'finishedAt'],
      where: {completed: true}
    }
  }]
});
Source by sequelize.org #
 
PREVIOUS NEXT
Tagged: #joins #sequelize #select #table
ADD COMMENT
Topic
Name
9+2 =