New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instance Methods and Hooks not working #8030
Comments
Instance and class methods have been removed as of v4. See here |
The |
@vidur149 should look like:
|
@FrenchBully Thanks. |
@FrenchBully Thanks 👍 |
I'm getting issues with it too. I've tried to create an instance, just like @FrenchBully said, but whenever I try to use it says "db.my_model.my_instance is not a function".
|
Well, I've just changed the instance method for an class method and worked!
By:
I just really didn't got why, I think the instance method should have worked ... |
What you are doing?
I am trying to access an instance method. Also the before create instance hook doesnt work.
As you can see the hashed password is geeting generated but unhashed password goes into the database.
model.ts
controller.ts
What do you expect to happen?
I exepcted that the callMe function will be called.
What is actually happening?
Dialect: mysql
Database version: XXX
Sequelize version: 4.42
The text was updated successfully, but these errors were encountered: