Sequelize包括 – 不包括(删除)数据透视
我正在使用节点的Sequelize包。 我有一个典型的男人包括很多关系。
Item.findAll({ include: {model: Blah: as 'blahs'} });
所有效果都很好,但是它会返回每个子项目上的透视数据集。 我不需要它。 有什么办法来禁用它或指定所需的透视字段?
find我的答案:
{model: Model, as: 'model', through: {attributes: []}}
这是不是很清楚你在找什么,但你可以尝试添加原料:真实
Item.findAll({ include: {model: Blah, raw: true} });
你能发表你得到的结果吗?