Sequelize.js 续集=>;为什么可以';在包含其他关联表时,不排除返回的come属性
sequelize=>当我包含另一个关联表时,为什么不能排除返回的come属性Sequelize.js 续集=>;为什么可以';在包含其他关联表时,不排除返回的come属性,sequelize.js,Sequelize.js,sequelize=>当我包含另一个关联表时,为什么不能排除返回的come属性 trips = await travelRequests.findAll({ where: { manager: email }, attributes: { exclude: [ 'userID', '
trips = await travelRequests.findAll({
where: {
manager: email
},
attributes: {
exclude: [ 'userID', 'passportNumber', 'gender', 'createdAt', 'updatedAt' ]
},
include: [{
model: Comments,
attributes: {
exclude: ['id', 'requestId' ]
}
}],
offset: pagination.offset,
limit: pagination.limit
});
我也遇到了同样的问题,我解决了,希望你也能解决你的问题
trips = await travelRequests.findAll({
where: {
manager: email
},
attributes: {
exclude: [ 'userID', 'passportNumber', 'gender', 'createdAt', 'updatedAt' ]
},
include: [{
model: Comments,
attributes: {
exclude: ['id', 'requestId' ]
}
}],
offset: pagination.offset,
limit: pagination.limit
});