【发布时间】:2020-11-11 01:14:03
【问题描述】:
我正在使用 sequelize 和 node.js。我想将 PrimaryPractice 模型的列的值相互连接。 我怎么解决这个问题? 这是我的代码:
ProviderPayer.findAll({
where: {
orgPayerId: {
[Op.in]: orgPayerIds
}
},
attributes: ["effective_date"],
include: [{
model: PayerTracks,
attributes: ["title"],
as: "payers",
},
{
model: User,
where: {
id: {[Op.in]: userIds},
deletedAt: null,
status: {[Op.ne]: STATUS.INACTIVE}
},
attributes: ["id"],
include: [
{
model: PrimaryPractice,
as: "primaryPractice",
attributes: [
"addressStreetPrimPract",
"addressStreet2PrimPract",
"addressCityPrimPract",
"addressStatePrimPract",
"addressZipPrimPract"]
}
]
}
]
})
【问题讨论】:
标签: node.js sequelize.js