Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

update instance in sequelize

const jane = await User.create({ name: "Jane" });
console.log(jane.name); // "Jane"
jane.name = "Ada";
// the name is still "Jane" in the database
await jane.save();
// Now the name was updated to "Ada" in the database!
Source by sequelize.org #
 
PREVIOUS NEXT
Tagged: #update #instance #sequelize
ADD COMMENT
Topic
Name
5+3 =