- raw:true
book.findAndCountAll({
attributes:['book.*','person.name'],
raw:true,
include:[{
model:person,
attributes:['name'],
}]
}).then(results => {
console.log("results.rows[0].name:",results.rows[0]['name']);
});
- raw:false
book.findAndCountAll({
attributes:['book.*','person.name'],
include:[{
model:person,
attributes:['name'],
}]
}).then(results => {
console.log("results.rows[0].person.name:",results.rows[0]['person.name']);
});
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者