sequelize关联查询mysql包含?-灵析社区

谁能阻止我删代码

const articles = await ArticleSchema.findAll({ include: [{ model: TagSchema, as: 'category', // 别名,根据你的模型定义来用 where: { id: [10, 11] }, // 你可以在这里指定一个或者多个标签ID through: { attributes: [], // 这会排除中间表的字段 } }] });

阅读量:1

点赞量:0

问AI