-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
association helper methods do not appear to be created. #11393
Comments
d'oh. it's getCourse_path. |
@ccemeraldeyes I struggled with this in the past as well 🤦♂️ thanks for reminding me of this. You probably agree with this behavior is ugly, right? I'll reopen this as a feature request to allow proper casing of this kind of thing. |
@papb ty! I saw that in the docs in some examples camelCase is the expectation for field names so I guess that's on us. Although none of the examples use multi-word field names! But yes, it would be great to convert entirely to camelCase for these methods :) |
I'm a bit late to the party, but I struggled with the same issue the last few days trying to find out whats wrong with my code. |
This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂 |
PROBLEM
Note: I cannot tell if this is a docs issue, a bug, or user error.
I have read through other seemingly-related bug reports (#7738, #6187, #10955) and lots of documentation and cannot find an answer.
My question is basically identical to #10955. I have defined associations on my models but when I try to call
course.getCoursePaths()
, I get an error thatgetCoursePaths()
is not a function oncourse
.Note that I have also tried all variations I can think of re: using hasOne instead of belongsTo and using plural/singular
I am using sequelize orm version 5.18.1 and node 10.16.0
MIGRATIONS
These execute happily
MODELS
CODE
What is going on here? Why doesn't getCoursePath() exist?
The text was updated successfully, but these errors were encountered: