-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
include: using options "separate" and "attributes" together throws TypeError: Cannot read property 'push' of undefined #8228
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂 |
not stale |
Facing the same problem! |
Same here, facing the same. |
It looks the same indeed, but it could be different as well. In my case, adding the foreign keys to the model definition and also in the the attributes list in the include object did not help. However what worked out in my case was to remove completely the attributes list form the include. This worked even without declaring the foreign keys explicitly in the model definition. |
What you are doing?
I try to include hasMany association with "include" that uses both "separate" option and "attributes" option
What do you expect to happen?
I expect that you can use both options together.
It should be possible to select certain attributes only AND to request separate queries (to avoid the 63 character issue when using PostgreSQL, for example)
What is actually happening?
when using both options together, findAll fails with this error:
Dialect: postgres
Database version: 9.4
Sequelize version: 4.7.5
The text was updated successfully, but these errors were encountered: