Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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
2+5 =