Я пытаюсь добавить нумерацию страниц, используя транзакцию при секвелировании, но когда я добавляю и предел, и смещение, он отображает ошибку как SequelizeDatabaseError: Неверное имя столбца 'typeId'.
try {
await sequelize.transaction(async (transaction) => {
data = await Test.findAll({
order: [['id', 'DESC']],
where: { type: 'Y' },
attributes: ['id', 'type', 'name'],
include: [
{
model: xyz,
as: 'xyz',
attributes: ['id'],
include: {
model: efg,
as: 'efg',
attributes: ['id', 'typeId'],
},
},
{
model: abc,
as: 'abc',
attributes: ['id'],
include: {
model: ijk,
as: 'ijk',
attributes: ['id', 'name'],
},
}
],
transaction,
limit: 10,
offset: 0,
}).then(res=>{
return res;
})
});
} catch(e) {
}
Любой совет будет очень признателен , Спасибо!