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
problem with underscored and polymorphic #11916
Comments
Hi @zgid123 I am having the same issue, did you find any solution? |
my problem exists for many to many relations |
I spent some time debugging the whole library and this is what I found
through.scope is assigned to through.where as a reference so when later we modify through.where and convert to underscores to match db names it will automatically change the through.scope my fix for that is a simple clone
not sure if that is the best way to fix that |
This issue should not be closed as it is not fixed. |
This is a big problem that doesn't seem to want to go away. Has anyone found a solution? |
Issue Description
What are you doing?
I want to include an polymorphic association when using
findAndCountAll
. But I faced a problem with that at the first query (it is the count query) at the first time. After facing that issue, I ran the query again and didn't face it anymore.Here is the quick example:
What do you expect to happen?
The result must be success with list products and each product has list media
What is actually happening?
The first time I ran that, it raised error "
media.resoureType
does not exist."Here the query:
This issue happens the first time I start server, I run the query again after fail, the query is correct. For temporary solution, I define association like this
Environment
Issue Template Checklist
How does this problem relate to dialects?
Would you be willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: