📜  sequelize inner join - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:46.902000             🧑  作者: Mango

代码示例4
User.hasMany(Post, {foreignKey: 'user_id'})
Post.belongsTo(User, {foreignKey: 'user_id'})

Post.find({ where: { ...}, include: [User]})