📜  在 sequelize 中更新实例 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:21.960000             🧑  作者: Mango

代码示例4
const jane = await User.create({ name: "Jane" });

jane.set({
  name: "Ada",
  favoriteColor: "blue"
});
// As above, the database still has "Jane" and "green"
await jane.save();
// The database now has "Ada" and "blue" for name and favorite color