Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

sequelize instance method is not a function

// starting with Sequelize 4.0 and above, you have to use the prototype methodology in order to define instance methods 

User.prototype.validPassword = function(password) {
      return bcrypt.compareSync(password, this.password);
};

 
PREVIOUS NEXT
Tagged: #sequelize #instance #method #function
ADD COMMENT
Topic
Name
8+5 =