Polymorphic Associations appear not to be created. #14625
Unanswered
Tzvetelin88
asked this question in
Help & Questions
Replies: 2 comments
-
I found the issue to be Typescript related, and Helper/Polymorphic do not appear in IDE. So, the solution was to add "any" as type when we get the model: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Please see https://sequelize.org/docs/v6/other-topics/typescript/ to view how to declare your models when you use typescript |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm following documentation here: https://sequelize.org/docs/v6/advanced-association-concepts/polymorphic-associations/,
to create two simple models with associations/relations between them, to get an access to Polymorphic/Helper association methods. But it seems something is not right. Helper method "createComment" -> Property 'createComment' does not exist on type 'Image'
Example:
Beta Was this translation helpful? Give feedback.
All reactions