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.reload();
console.log(jane.name); // "Jane"
Source by sequelize.org #
 
PREVIOUS NEXT
Tagged: #update #instance #sequelize
ADD COMMENT
Topic
Name
7+2 =