我在 MySQL 中使用 Sequelize,例如:
models.People.update({OwnerId: peopleInfo.newuser},
{where: {id: peopleInfo.scenario.id}})
.then(function (result) {
response(result).code(200);
}).catch(function (err) {
request.server.log(['error'], err.stack);
).code(200);
});
如果人员模型成功更新或者没有更新,我不会得到任何信息。变量 result 只是一个包含一个元素(0 = 1)的数组
我怎样才能确定记录是否已经更新。