include
include: [{
model: Casinos, required: true,
attributes: [],
include: [{
model: Countries,
attributes: [sequelize.literal('`casino.country`.`name` AS `country`')],
}, {
model: Cities,
attributes: [sequelize.literal('`casino.city`.`name` AS `city`')]
}]
}]
结果
{
"casino.country.id": 1,
"country": "中国1",
"casino.city.id": 1,
"city": "北京1"
}
这俩个id为什么会出来呢,我明明没有定义啊!