小编Sar*_*mar的帖子

In sequelize updateattributes method can update only one attribute in a table?

I tried(sequelize model) to update the values in the table, but it will update the only one value in the table.check the below example

employee.updateAttributes({first_name : value.first_name},
            {last_name : value.last_name},
            {email : value.email},
            {password : value.password},
            {phone : value.phone}
            ).on('success',function(employee){
    message.message = "Employee updated successfully";
    message.employee = employee;
    message.successMessage = "Success";
    callback(message);
})
Run Code Online (Sandbox Code Playgroud)

node.js sequelize.js

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

node.js ×1

sequelize.js ×1