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