Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

update instance in sequelize

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
Source by sequelize.org #
 
PREVIOUS NEXT
Tagged: #update #instance #sequelize
ADD COMMENT
Topic
Name
5+6 =