OK
Size: a a a
OK
KG
include: [
{
model: models.user_balance,
attributes: [],
required: false,
where: {
…….
}
},
{
model: models.transaction,
attributes: [],
required: false,
where: {
…….
}
}
]
KG
KG
OK
KG
KG
KG
KG
OK
KG
KG
OK
KG
OK
OK
const users = await models.user.findAll({
attributes: ['id', 'email', 'investedAmount', 'pendingAmount'],
include: [
{
model: models.user_balance,
attributes: [],
required: false,
},
{
model: models.transaction,
attributes: [],
required: true,
where: {
userId: {
[Op.ne]: null
}
}
}
],
where:
Sequelize.and(
Sequelize.where(
Sequelize.col('user_balances.userId'),
'IS',
null
)
),
logging: console.log
});OK
OK
Sequelize.where(
Sequelize.col('user_balances.userId'),
'IS',
null
)
YZ