- 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);
});
网友评论