当我执行findAll时,是否有方法或属性可以看到将在我的MS SQL DB上执行的原始查询。
var sql= {where: query.id,
attributes: queryAttrb,
include: [
{
model: queryModel,
where: dboQuery.spiStatus
}]};
model.findAll(sql);
答案 0 :(得分:0)
只需添加日志记录:
var sql = {
where: query.id,
attributes: queryAttrb,
include: [
{
model: queryModel,
where: dboQuery.spiStatus
}],
logging: console.log
};
model.findAll(sql);